Add Dijkstra's algorithm and graphutils module
Review Request #7327 — Created May 21, 2015 and submitted
Information | |
---|---|
brennie | |
Review Board | |
dvcs | |
7328 | |
f65ae49... | |
Reviewers | |
reviewboard | |
This patch adds the
diffviewer.graphutils
module which will contain
general purpose graph algorithms, the first of which being Dijkstra's
shortest path algorithm.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
Col: 1 W391 blank line at end of file |
![]() |
|
Can you clarify in here exactly what the input and output formats are supposed to be? I can figure it … |
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
![]() |
|
We should avoid using _ as a variable in any code, since by convention, we're using _ for gettext or … |
|
|
It might be nicer to have one big assert statement (compare distances against a dict that you create). |
|
|
Same here. |
|
Change Summary:
PEP8
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+42) |

-
Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/graphutils.py Tool: Pyflakes Processed Files: reviewboard/diffviewer/graphutils.py
-
Unit tests/testing done?
-
reviewboard/diffviewer/graphutils.py (Diff revision 2) Can you clarify in here exactly what the input and output formats are supposed to be? I can figure it out from the code, but it would be nice to just read it in the comment.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+99) |

-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/tests.py reviewboard/diffviewer/graphutils.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/tests.py reviewboard/diffviewer/graphutils.py
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+100) |

-
Tool: Pyflakes Processed Files: reviewboard/diffviewer/tests.py reviewboard/diffviewer/graphutils.py Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/tests.py reviewboard/diffviewer/graphutils.py
-
-
reviewboard/diffviewer/tests.py (Diff revision 4) It might be nicer to have one big assert statement (compare
distances
against a dict that you create). -
-
-
reviewboard/diffviewer/graphutils.py (Diff revision 4) We should avoid using
_
as a variable in any code, since by convention, we're using_
forgettext
orgettext_lazy
. Maybeunused
?
Change Summary:
Address Christian's and David's issues.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+104) |