[ https://issues.apache.org/jira/browse/SANDBOX-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221749#comment-13221749 ]
Claudio Squarcella edited comment on SANDBOX-404 at 3/4/12 10:18 AM: --------------------------------------------------------------------- Hi Simone, I am attaching a patch that begins with yours and goes one step further, getting rid of {{OrderedMonoid}} basically everywhere (although I did not delete {{OrderedMonoid}} itself for now) and replacing it with {{Monoid & Comparator}}. That has two reasons: * separating main operations/properties, so that every algorithm specifies what is needed in terms of a set of interfaces; * leading the way to the next refactoring step where {{Monoid}} is converted into {{Addition}}, in order to better represent what it actually does. So one step is missing, i.e. renaming {{Monoid}} to {{Addition}} (and {{Monoid#append}} to {{Addition#sum}}, etc) -- but first I want to get some feedback on this one. Ciao Claudio was (Author: claudio.squarcella): Hi Simone, I am attaching a patch that begins with yours and goes one step further, getting rid of {{OrderedMonoid}} basically everywhere and replacing it with {{Monoid & Comparator}}. That has two reasons: * separating main operations/properties, so that every algorithm specifies what is needed in terms of a set of interfaces; * leading the way to the next refactoring step where {{Monoid}} is converted into {{Addition}}, in order to better represent what it actually does. So one step is missing, i.e. renaming {{Monoid}} into {{Addition}} (and {{Monoid#append}} into {{Addition#sum}}, etc) -- but I first wanted to get some feedback on this one. Ciao Claudio > Simplify weight model > --------------------- > > Key: SANDBOX-404 > URL: https://issues.apache.org/jira/browse/SANDBOX-404 > Project: Commons Sandbox > Issue Type: Improvement > Components: Graph > Reporter: Simone Tripodi > Attachments: SANDBOX-404.patch, > SANDBOX-404_gettingRidOfOrderedMonoid.patch > > > As discussed on {{dev@}}, {{Zero}}, {{Semigroup}} and {{Monoid}} can be > merged directly in one single interface -- 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