public class HeavyPathDecomposition.InternalState extends Object
Constructor and Description |
---|
InternalState() |
Modifier and Type | Method and Description |
---|---|
int |
getComponent(V v)
Returns the component id of vertex $v$ in the internal DFS tree/forest.
|
int[] |
getComponentArray()
Return the internal component array.
|
int |
getDepth(V v)
Returns the depth of vertex $v$ in the internal DFS tree/forest.
|
int[] |
getDepthArray()
Return the internal depth array.
|
int[] |
getFirstNodeInPathArray()
Return the internal firstNodeInPath array.
|
List<V> |
getIndexList()
Return the index list, a mapping from unique integers to vertices.
|
V |
getParent(V v)
Returns the parent of vertex $v$ in the internal DFS tree/forest.
|
int[] |
getParentArray()
Return the internal parent array.
|
int[] |
getPathArray()
Return the internal path array.
|
int[] |
getPositionInPathArray()
Return the internal positionInPath array.
|
int |
getSizeSubtree(V v)
Returns the size of vertex $v$'s subtree in the internal DFS tree/forest.
|
int[] |
getSizeSubtreeArray()
Return the internal sizeSubtree array.
|
Map<V,Integer> |
getVertexMap()
Return the vertex map, a mapping from vertices to unique integers.
|
public V getParent(V v)
v
- vertexpublic int getDepth(V v)
The depth of a vertex $v$ is defined as the number of edges traversed on the path from the root of the DFS tree to vertex $v$. The root of each DFS tree has depth 0.
If the vertex $v$ has not been explored, $-1$ will be returned.
v
- vertexpublic int getSizeSubtree(V v)
The size of a vertex $v$'s subtree is defined as the number of vertices in the subtree rooted at $v$ (including $v).
If the vertex $v$ has not been explored, $0$ will be returned.
v
- vertexpublic int getComponent(V v)
The component ids are numbers between $0$ and $numberOfTrees - 1$.
If the vertex $v$ has not been explored, $-1$ will be returned.
v
- vertexpublic Map<V,Integer> getVertexMap()
public List<V> getIndexList()
public int[] getDepthArray()
public int[] getSizeSubtreeArray()
public int[] getComponentArray()
public int[] getPathArray()
Note: the indexing of paths is consistent with PathDecomposition#getPaths()
.
public int[] getPositionInPathArray()
public int[] getFirstNodeInPathArray()
Note: the indexing of paths is consistent with PathDecomposition#getPaths()
.
public int[] getParentArray()
Copyright © 2019. All rights reserved.