Hola Claudio! for all algorithms implemented in the `shortestpath` package (A*, Dijkstra, Bellmann-Ford, ...), I didn't have the need to add new specific methods for {{WeightedGraph}}es since that interface was used more as a marker - a direct graph, which edges are weighted (granted by generics), satisfies the algos input as well.
As domain expert you maybe know advanced algorithms that require more assumptions on the input graph, so any suggestion is welcome! Simo http://people.apache.org/~simonetripodi/ http://simonetripodi.livejournal.com/ http://twitter.com/simonetripodi http://www.99soft.org/ On Tue, Dec 6, 2011 at 10:11 AM, Claudio Squarcella <squar...@dia.uniroma3.it> wrote: > Hi, > > >>>> Moreover, I start having the feeling the {{WeightedGraph}} is a >>>> useless interface: it is enough marking the vertices/edges as weighted >>>> depending on the problem... or not? At the end of the day, >>>> {{WeightedGraph}} does nothing than having the the edges marked as >>>> weighted, so Dijkstra signature changed as: >>>> >>>> <V extends Vertex, WE extends WeightedEdge, G extends DirectedGraph<V, >>>> WE>> WeightedPath<V, WE> findShortestPath( G graph, V source, V >>>> target ) >>>> >>>> still define well the input type, a graph wich relations are directed >>>> edges and edges are weighted... WDYT? >>> >>> >>> I agree, as long as there are no specific features of the graph that are >>> independent on its vertices and edges. > > > quoting myself here: actually I think {{WeightedGraph}} should *not* go away > if it makes sense to add methods to it later (e.g. to get the total weight). > But changing the signature of the methods is still a valid idea, as it > allows for a more fine-grained expressiveness on the input. Right? > > Claudio > > >>> Another advantage: I won't bother >>> later to add more speficic interfaces like {{EdgeWeightedGraph}} or >>> {{VertexWeightedGraph}} ;-) >>> >> +1, please include that in a separate issue! >> All the best, have a nice day! >> Simo >> >>> Ciao, >>> Claudio >> >> http://people.apache.org/~simonetripodi/ >> http://simonetripodi.livejournal.com/ >> http://twitter.com/simonetripodi >> http://www.99soft.org/ >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> > > -- > Claudio Squarcella > PhD student at Roma Tre University > E-mail address: squar...@dia.uniroma3.it > Phone: +39-06-57333215 > Fax: +39-06-57333612 > http://www.dia.uniroma3.it/~squarcel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org