Interface CapacitatedSpanningTreeAlgorithm.CapacitatedSpanningTree<V,​E>

    • 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 whether cmst is a CMST on graph with root root, capacity capacity and demand function demands.
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • isCapacitatedSpanningTree

        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.
        Parameters:
        graph - the graph
        root - the expected root of cmst
        capacity - the expected capacity of cmst
        demands - 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.
      • getPartition

        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.
        Returns:
        map from labels to the subsets of the partition of the capacitated spanning tree.