Package org.jgrapht.alg.shortestpath
Class ContractionHierarchyPrecomputation.ContractionHierarchy<V,E>
- java.lang.Object
-
- org.jgrapht.alg.shortestpath.ContractionHierarchyPrecomputation.ContractionHierarchy<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- Enclosing class:
- ContractionHierarchyPrecomputation<V,E>
public static class ContractionHierarchyPrecomputation.ContractionHierarchy<V,E> extends java.lang.Object
Return type of this algorithm. ContainscontractionGraph
andcontractionMapping
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Graph<ContractionHierarchyPrecomputation.ContractionVertex<V>,ContractionHierarchyPrecomputation.ContractionEdge<E>>
getContractionGraph()
Returns contracted graph.java.util.Map<V,ContractionHierarchyPrecomputation.ContractionVertex<V>>
getContractionMapping()
Returns mapping of the vertices in the original graph to the vertices in the contracted graph.Graph<V,E>
getGraph()
Returns the underlying graph of this contraction hierarchy.void
unpackBackward(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, java.util.LinkedList<V> vertexList, java.util.LinkedList<E> edgeList)
Unpacksedge
by recursively going from target to source.void
unpackForward(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, java.util.LinkedList<V> vertexList, java.util.LinkedList<E> edgeList)
Unpacksedge
by recursively going from source to target.
-
-
-
Method Detail
-
getGraph
public Graph<V,E> getGraph()
Returns the underlying graph of this contraction hierarchy.- Returns:
- underlying graph of this contraction hierarchy
-
getContractionGraph
public Graph<ContractionHierarchyPrecomputation.ContractionVertex<V>,ContractionHierarchyPrecomputation.ContractionEdge<E>> getContractionGraph()
Returns contracted graph.- Returns:
- contracted graph
-
getContractionMapping
public java.util.Map<V,ContractionHierarchyPrecomputation.ContractionVertex<V>> getContractionMapping()
Returns mapping of the vertices in the original graph to the vertices in the contracted graph.- Returns:
- vertices mapping
-
unpackBackward
public void unpackBackward(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, java.util.LinkedList<V> vertexList, java.util.LinkedList<E> edgeList)
Unpacksedge
by recursively going from target to source.- Parameters:
edge
- edge to unpackvertexList
- vertex list of the pathedgeList
- edge list of the path
-
unpackForward
public void unpackForward(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, java.util.LinkedList<V> vertexList, java.util.LinkedList<E> edgeList)
Unpacksedge
by recursively going from source to target.- Parameters:
edge
- edge to unpackvertexList
- vertex list of the pathedgeList
- edge list of the path
-
-