-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Tarjan's strongly connected component and Shortest Cycle finder algorithm #106
Conversation
Thanks a bunch, the new algorithms are very much appreciated! 👍 Given the vast amount of changes theses introduce, expect the review to take a few days. But I'll come back to this ASAP. |
Great ! |
|
||
// Run the algorithm | ||
// echo $this->graph->__toString(); die; | ||
$algorithm = new Tarjan($this->graph); |
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.
Guess the comments above should go.
Nice feedbacks, fixed them ! |
* You can use Tarjan Algorithm to find such graphs. | ||
* @see http://stackoverflow.com/questions/10456935/graph-how-to-find-minimum-directed-cycle-minimum-total-weight | ||
*/ | ||
class CycleFinder extends BaseGraph |
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.
Looks like this class and its tests is independent of the other changes? If so, would you care to make this a separate PR?
New algorithms are very much appreciated, keeping them separated helps reviewing the changes and will get things in a lot easier 👍
Finally had the time to review this. Now with all my remarks in place, let me re-emphasize that the new algorithms are very much appreciated! 👍 I hope my feedback doesn't come over as criticizing, I'm really looking forward to support in fixing the outstanding issues so we can get this in. Thanks for your work! |
No pb clue, your feedbacks are much appreciated, making me a better developer :) I'll try to find some time this week to get the work done. |
This reverts commit daac188.
I just removed all unwanted additions and just left the Tarjan strongly connected algorithm. I replaced VerticeDataMap class by a SPLObjectStorage. Btw, I changed my username on github, dmoreaulf RIP. |
Sorry for the delay and thanks for your continuous interest! All algorithms will be split off to a separate package graphp/algorithms (see also #119 for some background). As such, this PR can no longer be merged into this repo. That being said, I'd still love this see this in! 👍 I've filed a new ticket as a reminder to keep track of this PR until it has been migrated over. |
Migrated here graphp/algorithms#14. |
@see http://stackoverflow.com/questions/10456935/graph-how-to-find-minimum-directed-cycle-minimum-total-weight
@see http://stones333.blogspot.fr/2013/12/find-cycles-in-directed-graph-dag.html
May BC, changed some exception throwing behavior inside edge and graph cloning behaviors.