V - the graph vertex typepublic class VertexToIntegerMapping<V> extends Object
This class computes the mapping only once, on instantiation. It does not support live updates.
| Constructor and Description |
|---|
VertexToIntegerMapping(Collection<V> vertices)
Create a new mapping from a collection of vertices.
|
VertexToIntegerMapping(List<V> vertices)
Create a new mapping from a list of vertices.
|
VertexToIntegerMapping(Set<V> vertices)
Create a new mapping from a set of vertices.
|
| Modifier and Type | Method and Description |
|---|---|
List<V> |
getIndexList()
Get the
indexList, a mapping from integers to vertices (i.e. |
Map<V,Integer> |
getVertexMap()
Get the
vertexMap, a mapping from vertices to integers (i.e. |
public VertexToIntegerMapping(Set<V> vertices)
vertices - the input set of verticesNullPointerException - if vertices is nullpublic VertexToIntegerMapping(List<V> vertices)
indexList so it must not be modified.vertices - the input list of verticesNullPointerException - if vertices is nullIllegalArgumentException - if the vertices are not distinctpublic VertexToIntegerMapping(Collection<V> vertices)
vertices - the input collection of verticesNullPointerException - if vertices is nullIllegalArgumentException - if the vertices are not distinctCopyright © 2019. All rights reserved.