Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 def __init__(self, name):
     BinaryTree.__init__(self, name)
Пример #4
0
 def __init__(self, rootid=None):
     BinaryTree.__init__(self, rootid)
     self.rootid = rootid
Пример #5
0
 def __init__(self):
     BinaryTree.__init__(self)
     self.color = None
Пример #6
0
 def __init__(self):
     BinaryTree.__init__(self)
     self.max = None