MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

graphs/bidirectional_a_star.py:94–101  ·  view source on GitHub ↗
(self, start: TPosition, goal: TPosition)

Source from the content-addressed store, hash-verified

92 """
93
94 def __init__(self, start: TPosition, goal: TPosition):
95 self.start = Node(start[1], start[0], goal[1], goal[0], 0, None)
96 self.target = Node(goal[1], goal[0], goal[1], goal[0], 99999, None)
97
98 self.open_nodes = [self.start]
99 self.closed_nodes: list[Node] = []
100
101 self.reached = False
102
103 def search(self) -> list[TPosition]:
104 while self.open_nodes:

Callers

nothing calls this directly

Calls 1

NodeClass · 0.70

Tested by

no test coverage detected