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/07/01 20:02:28 UTC

[jira] [Commented] (SANDBOX-335) [Graph] Graph Coloring: Backtracking algorithm

    [ https://issues.apache.org/jira/browse/SANDBOX-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058680#comment-13058680 ] 

Simone Tripodi commented on SANDBOX-335:
----------------------------------------

Hi Marco!
thanks for yet another patch! :) I didn't see the algorithm implementation but I have anyway few comments about code style:

 * I don't see the advantage of passing more generic graph instances in GraphUtils/Tests methods when in the body are built only specialized Vertices/Edges, using the ones one trunk is more canonical - and that's why we use generics here
 * I suggest you renaming methods in {{greedyColoring}} and {{backTrackingColoring}}, shortcuts on method names are not friendly;
 * I don't see the reason why you modified the {{ColoredVertices}} class applying the Class Adapter instead the Object Adapter as was in the origin; in that way users can potentially modify stored data and that's not good at all.

Can you provide the patch applying that modifications?
Thanks in advance!!!

> [Graph] Graph Coloring: Backtracking algorithm
> ----------------------------------------------
>
>                 Key: SANDBOX-335
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-335
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Marco Speranza
>            Priority: Minor
>         Attachments: GraphColoring-BackTrackingAlgo.patch
>
>
> Here is an little enhancement for graph coloring problem. I implemented an bruteforce algorithm that uses the backtracking technique to find the exact solution for the m-coloring problem (m is the maximum number of usable colors).  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira