commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Squarcella (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SANDBOX-364) Adding generic weight type to model
Date Sat, 21 Jan 2012 17:03:40 GMT
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
         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

        

Mime
View raw message