[ 
https://issues.apache.org/jira/browse/SANDBOX-364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claudio Squarcella updated SANDBOX-364:
---------------------------------------

    Attachment: AddingGenericWeightTypeToModel.patch
    
> Adding generic weight type to model 
> ------------------------------------
>
>                 Key: SANDBOX-364
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-364
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Graph
>            Reporter: Claudio Squarcella
>            Priority: Minor
>              Labels: generic, graph, weight, weightededge
>         Attachments: AddingGenericWeightTypeToModel.patch
>
>
> Hello,
> with this patch I introduce generic weight types in all the implementations 
> of the domain (mainly classes in the {{model}} packages both in {{main}} and 
> {{test}}). Consequently I updated tests and references to be fully generic.
> One side effect is that {{WeightedEdge}} does not implement {{Comparable}} 
> anymore, because that would imply passing it a {{Comparator}} for weights as 
> an argument upon creation. Instead, without polluting {{WeightedEdge}}, I 
> changed the classes where it was needed to be {{Comparable}} (e.g. in 
> {{Kruskal}} there is a {{PriorityQueue}} that is now initialized with an 
> appropriate {{Comparator}} instead of relying on {{Comparable}} edges).
> All tests are green. Hoping to help :-)
> Claudio

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to