You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2011/06/28 12:18:17 UTC
[jira] [Commented] (SANDBOX-333) Graph coloring implementation
[ https://issues.apache.org/jira/browse/SANDBOX-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056431#comment-13056431 ]
Simone Tripodi commented on SANDBOX-333:
----------------------------------------
That's simply amazing Marco, thanks for contributing!
I raw the patch and looks good, the only part I like less is {{GraphColoring}}, line 79:
{code}
int deg = ( (Set<V>) g.getConnectedVertices( v ) ).size();
{code}
That could be not always true, because users could provide their {{Graph}} implementation wrapping databases/NoSQL/something else... so what we can do is adding a method {{Integer getDegree( V )}} - having it makes sense also for other algorithms implementations... WDYT?
> Graph coloring implementation
> -----------------------------
>
> Key: SANDBOX-333
> URL: https://issues.apache.org/jira/browse/SANDBOX-333
> Project: Commons Sandbox
> Issue Type: Improvement
> Components: Graph
> Reporter: Marco Speranza
> Priority: Minor
> Attachments: GraphColoring.patch
>
>
> Hi all, I just implemented a simple version of graph coloring problem.
> This implementation contains the chromatic number ( is the minimal number of colors needed to color each vertex such that no two adjacent vertices share the same color) and also the coloring algorithm.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira