Package org.jgrapht.alg.interfaces
Class SpannerAlgorithm.SpannerImpl<E>
- java.lang.Object
-
- org.jgrapht.alg.interfaces.SpannerAlgorithm.SpannerImpl<E>
-
- Type Parameters:
E
- the graph edge type
- All Implemented Interfaces:
java.io.Serializable
,SpannerAlgorithm.Spanner<E>
- Enclosing interface:
- SpannerAlgorithm<E>
public static class SpannerAlgorithm.SpannerImpl<E> extends java.lang.Object implements SpannerAlgorithm.Spanner<E>, java.io.Serializable
Default implementation of the spanner interface.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<E>
edges
private static long
serialVersionUID
private double
weight
-
Constructor Summary
Constructors Constructor Description SpannerImpl(java.util.Set<E> edges, double weight)
Construct a new spanner
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<E>
getEdges()
Set of edges of the graph spanner.double
getWeight()
Returns the weight of the graph spanner.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
weight
private final double weight
-
edges
private final java.util.Set<E> edges
-
-
Constructor Detail
-
SpannerImpl
public SpannerImpl(java.util.Set<E> edges, double weight)
Construct a new spanner- Parameters:
edges
- the edgesweight
- the weight
-
-
Method Detail
-
getWeight
public double getWeight()
Description copied from interface:SpannerAlgorithm.Spanner
Returns the weight of the graph spanner.- Specified by:
getWeight
in interfaceSpannerAlgorithm.Spanner<E>
- Returns:
- weight of the graph spanner
-
getEdges
public java.util.Set<E> getEdges()
Description copied from interface:SpannerAlgorithm.Spanner
Set of edges of the graph spanner.- Specified by:
getEdges
in interfaceSpannerAlgorithm.Spanner<E>
- Returns:
- edge set of the spanner
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-