def __init__(self, problem, pop, total_size, parent=None, level=1, n=1): """ Initialize a node for the tree :param problem: Instance of the problem :param pop: Population for the node # Make sure format is called on pop first :param total_size: Total number of points in the whole population :param parent: Parent of the node :param level: Level of the tree :param n: Represents cut in the node :return: Node """ BinaryTree.__init__(self) self.problem = problem self._pop = pop self.level = level self.N = n self.total_size = total_size self._parent = parent self.east, self.west, self.c, self.x = None, None, None, None self.abort = False
def __init__(self, name): BinaryTree.__init__(self, name)
def __init__(self, rootid=None): BinaryTree.__init__(self, rootid) self.rootid = rootid
def __init__(self): BinaryTree.__init__(self) self.color = None
def __init__(self): BinaryTree.__init__(self) self.max = None