Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0766ca7

Browse files
authored
Corrected the coordinates for source and target
1 parent 145546e commit 0766ca7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎BiDiAstarSearch.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ def biDirectionalSearch(self, source, target):
643643

644644
successString = colored("Test Passed: ", "green")
645645
print(successString)
646-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
646+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
647647
print("The Path is: ", result[0])
648648
print("The number of nodes that have been visited are:", result[2])
649649
print("")
@@ -653,15 +653,15 @@ def biDirectionalSearch(self, source, target):
653653

654654
unWalkablePath = colored("Test Failed: ", "blue")
655655
print(unWalkablePath)
656-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
656+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
657657
unWalkable += 1
658658
print("")
659659

660660
else:
661661

662662
failureString = colored("Test Failed: ", "red")
663663
print(failureString)
664-
print("The coordinates are SOURCE(", item[4], ",", item[5], ") , TARGET(", item[6], ",", item[7], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
664+
print("The coordinates are SOURCE(", item[5], ",", item[4], ") , TARGET(", item[7], ",", item[6], ")", " || The result I'm getting: [", result[1], "] The result I should be getting: [", float(item[8][:-1]), "]")
665665
print("The Path is: ", result[0])
666666
wrong += 1
667667
if len(result) == 3:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /