{search,traverse}: clean up after recent changes #44
Conversation
Factor common types out into new graph/internal package.
This sort order was a lazy solution to sorting [][]int, so remove it.
Also remove unused remove method on johnsonGraph which was left over from the implementation in gonum/plot/plotter.
ping @gonum/developers |
@@ -398,6 +400,34 @@ func TestTarjanSCC(t *testing.T) { | |||
} | |||
} | |||
|
|||
// batageljZaversnikGraph is the example graph from |
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.
Is it worth having an 'example graphs' package in internal so that way we only need to implement this once?
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.
Or possibly not in internal if we want to expose some easy examples (like in optimize)
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'm happy to do that in a later change (I think that this has merit for a number of reasons - including as a teaching resource), but I'd like to just get the place clean first.
I'll file an issue.
Code changes LGTM except for the one comment on the example graphs. |
|
||
package internal | ||
|
||
// A set is a set of integer identifiers. |
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.
A set -> IntSet
And capital letters in the comments below.
Also LGTM |
{search,traverse}: clean up after recent changes
Add internal package for (most) shared unexported types and factor test example graphs into named values.