Package org.jgrapht.alg.interfaces
Interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Superinterfaces:
java.lang.Iterable<E>
,SpanningTreeAlgorithm.SpanningTree<E>
- All Known Implementing Classes:
CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTreeImpl
- Enclosing interface:
- CapacitatedSpanningTreeAlgorithm<V,E>
public static interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,E> extends java.lang.Iterable<E>, SpanningTreeAlgorithm.SpanningTree<E>
A spanning tree.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.boolean
isCapacitatedSpanningTree(Graph<V,E> graph, V root, double capacity, java.util.Map<V,java.lang.Double> demands)
Tests whethercmst
is a CMST ongraph
with rootroot
, capacitycapacity
and demand functiondemands
.-
Methods inherited from interface org.jgrapht.alg.interfaces.SpanningTreeAlgorithm.SpanningTree
getEdges, getWeight, iterator
-
-
-
-
Method Detail
-
isCapacitatedSpanningTree
boolean isCapacitatedSpanningTree(Graph<V,E> graph, V root, double capacity, java.util.Map<V,java.lang.Double> demands)
Tests whethercmst
is a CMST ongraph
with rootroot
, capacitycapacity
and demand functiondemands
.- Parameters:
graph
- the graphroot
- the expected root of cmstcapacity
- the expected capacity of cmstdemands
- the demand function- Returns:
- whether
cmst
is a CMST
-
getLabels
java.util.Map<V,java.lang.Integer> getLabels()
Return the set of labels of the underlying partition of the capacitated spanning tree. The labels are a key to the vertex sets of the partition.- Returns:
- the label set of the capacitated spanning tree.
-
-