Hi Simone,

the patch you mentioned was something I would have asked you, before or later :P

I know I can read your mind :)

Since we are on topic: is there any particular reason why Zero.zero()
can not be part of Semigroup interface? Or better: is there any
benefit we can get from keeping Zero and Semigroup separated?

basically the answer is in the following equation:
Monoid = Semigroup + Zero
And also:
OrderedMonoid = Semigroup + Zero + Comparator

The reason why we built all the stack was to allow fine granularity when defining properties of weights. E.g. it might happen for some reason that we need to sum weights without needing to know their "zero" value, or viceversa. In our current implementations OrderedMonoid takes most of the space (as expected), but also Zero and Monoid are explicitly used.

Ciao,
Claudio

--
Claudio Squarcella
PhD student at Roma Tre University
http://www.dia.uniroma3.it/~squarcel
http://squarcella.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to