-
Notifications
You must be signed in to change notification settings - Fork 821
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
Refactoring ChordalityInspector and interface revision #547
Conversation
Regarding the interfaces I personally prefer to not add method Regarding implementation, if we want to replace them with something which behaves like a |
@d-michail good suggestion. I implemented the |
} | ||
|
||
/** | ||
* Lazily computes some maximum clique of the {@code graph}. Returns null if the graph isn't chordal. |
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 method doesn't return anything.
|
||
/** | ||
* Lazily computes a maximum independent set of the inspected {@code graph}. | ||
* If the graph isn't chordal, returns null. |
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.
The same here
Some method documentation needs to be updated, cause the methods don't return anything anymore. |
Any more comments on this one? |
@@ -135,7 +135,7 @@ public double getWeight(V targetVertex) | |||
} | |||
|
|||
double weight = 0d; | |||
while (p != null && !p.equals(source)) { | |||
while (p != null) { |
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.
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.
Ok, I stand corrected. Thanks for the clarification. Updated my branch accordingly.
any additional requests? |
Looks good! |
CycleDetector
toorg.jgrapht.alg.cycle
packageChordalityInspector
(moved coloring, clique and independent set methods to their own classes/packages).ChordalGraphColoring
,ChordalGraphMaxCliqueFinder
,ChordalGraphIndependentSetFinder
and corresponding tests.CliqueAlgorithm
,IndependentSetAlgorithm
,VertexCoverAlgorithm
WeightedUnmodifiableSet
as a generic container for weighted sets (e.g. max weight clique)HamiltonianCycleAlgorithm
MinimumWeightedVertexCoverAlgorithm
andMinimumVertexCoverAlgorithm
interfaces by one unifiedVertexCoverAlgorithm
interface which is similar in structure asCliqueAlgorithm
andIndependentSetAlgorithm
To simplify reviewing, no modifications to the algorithms have been made.