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>
queue
protected Graph<V,E>
spanner
protected java.util.Deque<V>
touchedVertices
protected 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 void
addSpannerEdge(V s, V t, double weight)
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.-
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:
isSpannerReachable
in classGreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
addSpannerEdge
public void addSpannerEdge(V s, V t, double weight)
- Specified by:
addSpannerEdge
in classGreedyMultiplicativeSpanner.SpannerAlgorithmBase
-
-