def __init__(self, start_node, end_node, distance=0, augmenting_flow=-1, residual_flow=0):
        Edge.__init__(self, start_node, end_node)

        self.residual_flow = residual_flow
        self.distance = distance
        if augmenting_flow >= 0:
            self.augmenting_flow = augmenting_flow
        else:
            self.augmenting_flow = distance


# class Worker:
#     """
#     :type edges :
#     """
#     def __init__(self, edges):
#         self.edges = edges
#         pass
Exemple #2
0
 def __init__(self, order=1):
     Edge.__init__(self)
     self.order = order
Exemple #3
0
 def __init__(self, order=1):
     Edge.__init__(self)
     self.order = order
 def __init__(self, a, b):
     Edge.__init__(self, a, b)
Exemple #5
0
	def __init__(self, src, dest, weight1, weight2):
		Edge.__init__(self, src, dest)
		self.weight1 = weight1
		self.weight2 = weight2
Exemple #6
0
 def __init__(self, order=None):
     Edge.__init__(self)
     self.order = order or []