commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Squarcella <>
Subject Re: [Graph] On graph weight type(s)
Date Sun, 12 Feb 2012 20:20:43 GMT
Hi Simone,

>> Would it be so terrible to maintain such redundancy?
> IMHO, yes, because:
>   * it has to be applied in each class of algorithms we support;
>   * switching to proposed APIs, would proliferate that APIs in each algorithm;
>   * weight types are driven by generics, so users cannot bind wrong
> weight monoid already at compile time.
> more proposals? :)

ok fair enough, you were quite convincing :)

Before giving up, one more alternative:

  * the mapping between primitive types and their respective default
    *Operations is known and kept somewhere (abstract class, etc);
  * each algorithm specifies only once the set of primitive types that
    it accepts;
  * with a bit of magic (?) we combine the above to provide shortcuts to
    the user.

Note: I don't want to over-engineer, I would just like the user not to 
specify default *Operations, because that is also redundant from his/her 
point of view.

Ciao and thanks,

Claudio Squarcella
PhD student at Roma Tre University

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message