Skip to content

Commit 28a8c2b

Browse files
committed
fix: add \_\_eq\_\_ in Node class
#8770
1 parent b78ff3f commit 28a8c2b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: graphs/greedy_best_first.py

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def calculate_heuristic(self) -> float:
8282

8383
def __lt__(self, other) -> bool:
8484
return self.f_cost < other.f_cost
85+
86+
def __eq__(self, other):
87+
return self.pos == other.pos
8588

8689

8790
class GreedyBestFirst:

0 commit comments

Comments
 (0)