commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Squarcella <>
Subject Re: [graph] Why the Vertex and Edge interfaces?
Date Sat, 03 Mar 2012 16:11:43 GMT
Hi Simone,

answering briefly below:

> Vertex is something we can safety drop because we
> know its nature at priori, markers are unnecessary.This is fine.


> what is the sense, at that point, on keeping the Edge?!! It would be
> more than enough to know which is the Head and which is the Tail in
> the Edge to get the W!

good observation. My 2 cents: it might still make sense for users to map 
their existing domain (including "edges") to the graph (e.g. Routers to 
Vertices and Cables to Edges) and "get it back" as soon as they are done 
with graph operations (e.g. once they find the shortest path, they 
automatically have the sequence of Cables they need).

> maybe because they implement OrderedMonoid? :)
> [...]
> how much would Addition and Multiplication interface differ each other?
> [...]
> that would be fine, what is not clear is that Monoids expose the same
> interface, so *Operations class implementation canot declare same
> method multiple times

answering all the above: that is another reason why I would like our 
current Monoid to be called Addition (and Addition#sum instead of 
Monoid#append, etc), so that it is semantically clearer and later we can 
introduce Multiplication as a completely independent interface.

> enough talk IMHO, time to code and make concrete proposals

I'll play with weights first, because I already know what I want to do.
As for Vertex/Edge markers I still see valuable feedback coming in, so 
I'll wait a bit.

Branching is ok -- especially for the second part which sounds like a 
real earthquake ;)


Claudio Squarcella
PhD student at Roma Tre University

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

View raw message