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 Fri, 02 Mar 2012 08:40:20 GMT
Hi all,

> Claudio is aware also about algorithms where weights are associated to
> Vertex - he's preparing his PhD research on graphes - maybe he can
> show us a more long-vision roadmap and evaluate benefits on
> simplifying the design.

yes there are algorithms with weights on vertices. Of course those with 
weighted edges (like the ones already implemented) are much more 
widespread and frequently used, but still we cannot forget about that. 
Also, although on a secondary level, labels on vertices/edges are kind 
of important in many situations (including testing, debugging) where I 
think it is good to keep them distinct from the standard "toString" 
method (you might want to represent only a subset of info in the label, 

Matthew Pocock suggested an alternative approach back in the days of 
weight abstraction:

  * the graph itself is extremely simple and naked: no weights/labels on
  * all properties are stored in some external structure, which I
    imagine composed of associative maps (Map<Edge, Weight>, etc etc).

He motivated the idea with a "personal use case": often graphs are used 
and reused with the same structure but different weights (and/or labels, 
etc). Now if James' question becomes a second use case, maybe it's the 
right time to exhume that idea ;)


Claudio Squarcella
PhD student at Roma Tre University

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

View raw message