Class IndexGraphBuilder.ReIndexedGraph

java.lang.Object
com.jgalgo.graph.IndexGraphBuilder.ReIndexedGraph
Enclosing interface:
IndexGraphBuilder

public static final class IndexGraphBuilder.ReIndexedGraph extends Object
A result object of re-indexing and building a graph operation.

Re-indexing is the operation of assigning new indices to the vertices/edges. By re-indexing the vertices/edges, the performance of accessing/iterating over the graph vertices/edges may increase, for example if a more cache friendly indexing exists.

During the lifetime of a IndexGraphBuilder, vertices and edges are added to it, each one of them has a unique int identifier which is also its index (see IndexGraph). The builder can re-index the vertices/edges and build a new graph, resulting in a re-indexed graph graph, the vertices re-indexing verticesReIndexing and the edges re-indexing edgesReIndexing.

Author:
Barak Ugav
See Also:
  • Field Details

    • graph

      public final IndexGraph graph
      The newly created re-indexed graph.
    • verticesReIndexing

      public final Optional<IndexGraphBuilder.ReIndexingMap> verticesReIndexing
      The re-indexing map of the vertices.

      The map (if present) can map each original vertex index to its new index after re-indexing. If the map is not present, the vertices were not re-indexed.

    • edgesReIndexing

      public final Optional<IndexGraphBuilder.ReIndexingMap> edgesReIndexing
      The re-indexing map of the edges.

      The map (if present) can map each original edge index to its new index after re-indexing. If the map is not present, the edges were not re-indexed.