Skip to content

Conversation

@jack-dunham
Copy link
Contributor

@jack-dunham jack-dunham commented Jan 26, 2026

Most changes pertain to the files quotientvertex.jl and quotientedge.jl.

  1. Base.getindex now canonize the index argument via to_graph_index before calling get_graph_indices or get_graph_index when canonized to a subtype of AbstractGraphIndices or not, respectively.
  2. The function get_graph_index throws a MethodError by default, therefore using the Base.getindex syntax with a single vertex as the index, e.g. g[1], now throws a MethodError for AbstractNamedGraph graphs.
    • One should use g[Vertices([1])] or subgraph(g, 1) to construct a subgraph of g with only the vertex 1.
    • This is so Base.getindex behaves similarly for AbstractNamedGraph and AbstractDataGraph as AbstractDataGraph specializes on get_graph_index.
  3. One can use Dictionaries.getindices to directly call get_graph_indices no matter the argument. The index argument then gets canonized via to_graph_indices.
  4. All QuotientXX index collection structs now have an edge counterpart.

@mtfishman
Copy link
Member

@jack-dunham looks like this requires a version bump. I'm torn about whether we should consider this to be breaking, maybe to be on the safe side we should mark it as breaking.

@jack-dunham jack-dunham marked this pull request as ready for review January 27, 2026 15:51
@jack-dunham
Copy link
Contributor Author

jack-dunham commented Jan 27, 2026

@jack-dunham looks like this requires a version bump. I'm torn about whether we should consider this to be breaking, maybe to be on the safe side we should mark it as breaking.

I think breaking is sensible as indexing like g[1] and g[[1,2]] no longer behaves as it did previously. The former should error and the latter assumes [1,2] is a vertex, and thus should also error. Both of these constructed subgraphs previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants