V - the graph vertex typeE - the graph edge typepublic static class CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreeImpl<V,E> extends java.lang.Object implements CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>, java.io.Serializable
| Constructor and Description |
|---|
CapacitatedSpanningTreeImpl(java.util.Map<V,java.lang.Integer> labels,
java.util.Map<java.lang.Integer,Pair<java.util.Set<V>,java.lang.Double>> partition,
java.util.Set<E> edges,
double weight)
Construct a new capacitated spanning tree.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<E> |
getEdges()
Set of edges of the spanning tree.
|
java.util.Map<V,java.lang.Integer> |
getLabels()
Return the set of labels of the underlying partition of the capacitated spanning tree.
|
java.util.Map<java.lang.Integer,Pair<java.util.Set<V>,java.lang.Double>> |
getPartition()
Return the label-to-partition map of the underlying partition of capacitated spanning
tree.
|
double |
getWeight()
Returns the weight of the spanning tree.
|
boolean |
isCapacitatedSpanningTree(Graph<V,E> graph,
V root,
double capacity,
java.util.Map<V,java.lang.Double> demands)
Tests whether
cmst is a CMST on graph with root
root, capacity capacity and demand function
demands. |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waititeratorpublic CapacitatedSpanningTreeImpl(java.util.Map<V,java.lang.Integer> labels, java.util.Map<java.lang.Integer,Pair<java.util.Set<V>,java.lang.Double>> partition, java.util.Set<E> edges, double weight)
labels - the labelling of the vertices marking their subset membership in the
partitionpartition - the implicitly defined partition of the vertices in the capacitated
spanning treeedges - the edge set of the capacitated spanning treeweight - the weight of the capacitated spanning tree, i.e. the sum of all edge
weightspublic boolean isCapacitatedSpanningTree(Graph<V,E> graph, V root, double capacity, java.util.Map<V,java.lang.Double> demands)
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreecmst is a CMST on graph with root
root, capacity capacity and demand function
demands.isCapacitatedSpanningTree in interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>graph - the graphroot - the expected root of cmstcapacity - the expected capacity of cmstdemands - the demand functioncmst is a CMSTpublic java.util.Map<V,java.lang.Integer> getLabels()
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreegetLabels in interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>public java.util.Map<java.lang.Integer,Pair<java.util.Set<V>,java.lang.Double>> getPartition()
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreegetPartition in interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>public double getWeight()
SpanningTreeAlgorithm.SpanningTreegetWeight in interface SpanningTreeAlgorithm.SpanningTree<E>public java.util.Set<E> getEdges()
SpanningTreeAlgorithm.SpanningTreegetEdges in interface SpanningTreeAlgorithm.SpanningTree<E>public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019. All Rights Reserved.