Interface IndexGraphBuilder.ReIndexingMap
-
- Enclosing interface:
- IndexGraphBuilder
public static interface IndexGraphBuilder.ReIndexingMap
A map of indices, mapping an original index to a re-indexed index.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.
A 're-indexed' index is the index assigned to vertex/edge after a re-indexing operation on a graph. This interface is used to represent the mapping of both vertices and edges (a single instance map either vertices or edges), and it should be understood from the context which one is it. In the documentation we use the term element to refer to either vertex or edge.
Re-indexing of the vertices (or edges) is a mapping from
[0,1,2,...,verticesNum-1]
to[0,1,2,...,verticesNum-1]
, namely its bijection function.- Author:
- Barak Ugav
- See Also:
IndexGraphBuilder.reIndexAndBuild(boolean, boolean)
,IndexGraphBuilder.ReIndexedGraph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
origToReIndexed(int orig)
Map an element's original index to its re-indexed index.int
reIndexedToOrig(int reindexed)
Map an element's re-indexed index to its original index.
-
-
-
Method Detail
-
origToReIndexed
int origToReIndexed(int orig)
Map an element's original index to its re-indexed index.- Parameters:
orig
- an element's original index- Returns:
- the element's re-index index
-
reIndexedToOrig
int reIndexedToOrig(int reindexed)
Map an element's re-indexed index to its original index.- Parameters:
reindexed
- an element's re-indexed index- Returns:
- the element's original index
-
-