Currently, in many places where a graph is represented: LTS, PG and Graph traits it's convenient that the vertices are numbered 0 to num_of_vertices(). For example the indexed partition works this way, since indexing into a table is very cheap.
However, for a subgraph, which is simply another struct that implements the same trait, we can either decide to ensure that all vertices are remapped to dense vertex indices. However, this requires keeping track of two mappings from and to the old and new indices. Alternatively, we keep num_of_vertices() the same for the subgraph, but ensure that only indices of vertices part of the subgraph are returned with their original vertex.
Currently, in many places where a graph is represented:
LTS,PGandGraphtraits it's convenient that the vertices are numbered 0 tonum_of_vertices(). For example the indexed partition works this way, since indexing into a table is very cheap.However, for a subgraph, which is simply another struct that implements the same trait, we can either decide to ensure that all vertices are remapped to dense vertex indices. However, this requires keeping track of two mappings from and to the old and new indices. Alternatively, we keep
num_of_vertices()the same for the subgraph, but ensure that only indices of vertices part of the subgraph are returned with their original vertex.