Module org.jgrapht.core
Package org.jgrapht.alg.spanning
Class GreedyMultiplicativeSpanner.UnweightedSpannerAlgorithm
- java.lang.Object
-
- org.jgrapht.alg.spanning.GreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
- org.jgrapht.alg.spanning.GreedyMultiplicativeSpanner.UnweightedSpannerAlgorithm
-
- Enclosing class:
- GreedyMultiplicativeSpanner<V,E>
private class GreedyMultiplicativeSpanner.UnweightedSpannerAlgorithm extends GreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Deque<V>queueprotected Graph<V,E>spannerprotected java.util.Deque<V>touchedVerticesprotected java.util.Map<V,java.lang.Integer>vertexDistance
-
Constructor Summary
Constructors Constructor Description UnweightedSpannerAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSpannerEdge(V s, V t, double weight)booleanisSpannerReachable(V s, V t, double hops)Check if two vertices are reachable by a BFS in the spanner graph using only a certain number of hops.-
Methods inherited from class org.jgrapht.alg.spanning.GreedyMultiplicativeSpanner.SpannerAlgorithmBase
run
-
-
-
-
Method Detail
-
isSpannerReachable
public boolean isSpannerReachable(V s, V t, double hops)
Check if two vertices are reachable by a BFS in the spanner graph using only a certain number of hops. We execute this procedure repeatedly, therefore we need to keep track of what it touches and only clean those before the next execution.- Specified by:
isSpannerReachablein classGreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
addSpannerEdge
public void addSpannerEdge(V s, V t, double weight)
- Specified by:
addSpannerEdgein classGreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
-