Skip to content

[ENHANCEMENT] Further improvements to graph indexing code logic #116

@mtfishman

Description

@mtfishman

Here are some potential followups to #115:

  • Vertex wrapper (like Vertices but indicating it is a single vertex).
  • to_vertex function as an interface for canonicalizing single vertex inputs, such as converting QuotientVertexVertex to a plain vertex (which is currently handled by to_graph_index).
  • get_graph_index could call out to new interface functions get_graph_vertex or get_graph_edge, and maybe call to_vertex or to_edge for vertex/edge canonicalization (see the point above proposing to_vertex).
  • get_graph_indices could call out to new interface functions get_graph_vertices or get_graph_edges, which could call to_vertices or to_edges for vertex/edge collection canonicalization (such as wrapping QuotientVertexVertices in a QuotientVertexSlice).
  • Reevaluate parent_graph_indices, maybe find a better name or see if it can be removed.
  • Reevaluate graph_index_list_to_graph_index name/interface. Maybe it could be called flatten_graph_index_list?
  • Define isassigned(g::AbstractNamedGraph, I) = false (and write it in terms of associated interface functions is_graph_index_assigned, etc. which would get overloaded by DataGraphs).
  • Define and ispartitioned(g) trait function and use it in departition/unpartition, see the discussion here: PartitionedGraphs extension for DataGraphs and interface overhaul.  DataGraphs.jl#55 (comment).
  • Reassess what is output by add/rem_vertex!, add/rem_edge!, since it is not consistent with the output of those functions in Graphs.jl. Maybe we want to introduce other stricter interfaces like insert_vertex!, delete_vertex!, set_vertex!, unset_vertex!, etc. (modeled after the Dictionaries.jl interface).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions