def __init__(self, problem, priorityFunction): "priorityFunction (item) -> priority" self.priorityFunction = priorityFunction # store the priority function PriorityQueue.__init__(self) # super-class initializer self.problem = problem
def __init__(self, problem, priorityFunction): self.priorityFunction = priorityFunction PriorityQueue.__init__(self) self.problem = problem
def __init__(self, problem, priority): self.problem = problem self.priority = priority PriorityQueue.__init__(self)
def __init__(self, problem, function): PriorityQueue.__init__(self) self.function = function self.problem = problem
def __init__(self,problem, priorityF): self.priorityF = priorityF PriorityQueue.__init__(self) self.problem = problem
def __init__(self): PriorityQueue.__init__(self)
def __init__(self, problem, costFunction): "priorityFunction (item) -> priority" PriorityQueue.__init__(self) # Pythonly re-use PriorityQueue class self.heuristic = costFunction # store the heuristic/cost function self.problem = problem
def __init__(self, problem, priorityFunction): "priorityFunction (item) -> priority" self.priorityFunction = priorityFunction # store the priority function PriorityQueue.__init__(self) self.problem = problem