-
Notifications
You must be signed in to change notification settings - Fork 314
Implemented A* algorithm and updated test cases #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
b2a6d2d
47e8368
acf466e
d72bf9d
b1ca7cf
1cfebb7
ecae767
55642c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||||
| from pydatastructs.graphs.graph import Graph | ||||||
| from pydatastructs.linear_data_structures.algorithms import merge_sort_parallel | ||||||
| from pydatastructs import PriorityQueue | ||||||
| from pydatastructs.graphs.graph import AdjacencyListGraphNode | ||||||
|
|
||||||
| __all__ = [ | ||||||
| 'breadth_first_search', | ||||||
|
|
@@ -24,6 +25,7 @@ | |||||
| 'topological_sort', | ||||||
| 'topological_sort_parallel', | ||||||
| 'max_flow' | ||||||
|
||||||
| 'max_flow' | |
| 'max_flow', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comma here.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. The logic below already handles this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try changing the body of this function to pass. Check if the CI checks pass. Else, make a new PR with small code additions and one commit at a time, and ensure CI passes.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |||||||
| depth_first_search, shortest_paths, topological_sort, | ||||||||
| topological_sort_parallel, max_flow) | ||||||||
| from pydatastructs.utils.raises_util import raises | ||||||||
|
|
||||||||
| def test_breadth_first_search(): | ||||||||
|
|
||||||||
| def _test_breadth_first_search(ds): | ||||||||
|
|
@@ -293,7 +292,34 @@ def _test_shortest_paths_positive_edges(ds, algorithm): | |||||||
| graph.remove_edge('SLC', 'D') | ||||||||
| graph.add_edge('D', 'SLC', -10) | ||||||||
| assert raises(ValueError, lambda: shortest_paths(graph, 'bellman_ford', 'SLC')) | ||||||||
|
|
||||||||
| def _test_a_star_manhattan(ds): | ||||||||
|
||||||||
| def _test_a_star_manhattan(ds): | |
| def _test_a_star_manhattan(ds): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i remove this tests for the astar algorithem here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggestion means that you need to add a blank line before the function definition starts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you have added this import, but it is being used in a code block that is commented. Please try removing this and check if the CI tests pass.