Module org.jgrapht.core
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>
Return type of this algorithm. Contains
contractionGraph
and
contractionMapping
.-
Method Summary
Modifier and TypeMethodDescriptionGraph<ContractionHierarchyPrecomputation.ContractionVertex<V>,
ContractionHierarchyPrecomputation.ContractionEdge<E>> Returns contracted graph.Returns mapping of the vertices in the original graph to the vertices in the contracted graph.getGraph()
Returns the underlying graph of this contraction hierarchy.void
unpackBackward
(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, LinkedList<V> vertexList, LinkedList<E> edgeList) Unpacksedge
by recursively going from target to source.void
unpackForward
(ContractionHierarchyPrecomputation.ContractionEdge<E> edge, LinkedList<V> vertexList, LinkedList<E> edgeList) Unpacksedge
by recursively going from source to target.
-
Method Details
-
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
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, LinkedList<V> vertexList, 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, LinkedList<V> vertexList, 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
-