Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
Class SteinerTreeAlgorithm.SteinerTreeImpl<E>
- java.lang.Object
-
- org.jgrapht.alg.interfaces.SteinerTreeAlgorithm.SteinerTreeImpl<E>
-
- Type Parameters:
E
- the graph edge type
- All Implemented Interfaces:
Serializable
,Iterable<E>
,SteinerTreeAlgorithm.SteinerTree<E>
- Enclosing interface:
- SteinerTreeAlgorithm<V,E>
public static class SteinerTreeAlgorithm.SteinerTreeImpl<E> extends Object implements SteinerTreeAlgorithm.SteinerTree<E>, Serializable
Default implementation of the Steiner tree interface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SteinerTreeImpl(Set<E> edges, double weight)
Construct a new Steiner tree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<E>
getEdges()
Set of edges of the Steiner tree.double
getWeight()
Returns the weight of the Steiner tree.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.jgrapht.alg.interfaces.SteinerTreeAlgorithm.SteinerTree
iterator
-
-
-
-
Method Detail
-
getWeight
public double getWeight()
Description copied from interface:SteinerTreeAlgorithm.SteinerTree
Returns the weight of the Steiner tree.- Specified by:
getWeight
in interfaceSteinerTreeAlgorithm.SteinerTree<E>
- Returns:
- weight of the Steiner tree
-
getEdges
public Set<E> getEdges()
Description copied from interface:SteinerTreeAlgorithm.SteinerTree
Set of edges of the Steiner tree.- Specified by:
getEdges
in interfaceSteinerTreeAlgorithm.SteinerTree<E>
- Returns:
- edge set of the Steiner tree
-
-