Class BuildTree


  • public class BuildTree
    extends java.lang.Object
    Utility class that builds the dual feasible AKP initial tree from a given instance.
    Author:
    brockhoff
    • Constructor Summary

      Constructors 
      Constructor Description
      BuildTree()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static InitTreeArrayStruct buildTreeArray​(int cSrc, int cTar, float[] sizeHill, float[] sizeHole, DistanceMatrix cost)
      Build an array instance of the initial tree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BuildTree

        public BuildTree()
    • Method Detail

      • buildTreeArray

        public static InitTreeArrayStruct buildTreeArray​(int cSrc,
                                                         int cTar,
                                                         float[] sizeHill,
                                                         float[] sizeHole,
                                                         DistanceMatrix cost)
        Build an array instance of the initial tree. See {@see Tree}.
        Parameters:
        cSrc - Number of sources
        cTar - Number of targets
        sizeHill - Amount of earth at the sources
        sizeHole - Size of the holes (NEGATIVE)
        cost - Cost matrix (source,target)
        Returns:
        struct containing the tree and deficit/surplus subtrees(roots)