That makes sense. And yes it definitely pushes the limit of our existing model as it is. The ArrayListWritable<T> when implemented (as in GIRAPH-228 and MsgList.java) does provide ordered access, and if the out edges are <T> tuples, they could contain multiple state values that allow for more specific identification than sharing an out-edge destination and the various multi-path values in the tuple. But perhaps an explicit implementation of a mutligraph base-class vertex would be the way to go? This does provide the opportunity to optimize it before folks start subclassing it for their application work. Good point.
On Sat, Jul 7, 2012 at 9:32 AM, Alessandro Presta (JIRA) <j...@apache.org>wrote: > > [ > https://issues.apache.org/jira/browse/GIRAPH-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408710#comment-13408710] > > Alessandro Presta commented on GIRAPH-141: > ------------------------------------------ > > Note that, at least for the immutable case, multigraphs come for free if > we switch to an Iterator<Edge<I, E>> in the vertex API. > That is, unless an implementation is optimized for unique edges (e.g. > IntIntNullIntVertex). > > > multigraph support in giraph > > ---------------------------- > > > > Key: GIRAPH-141 > > URL: https://issues.apache.org/jira/browse/GIRAPH-141 > > Project: Giraph > > Issue Type: Improvement > > Components: graph > > Reporter: André Kelpe > > Assignee: Alessandro Presta > > > > The current vertex API only supports simple graphs, meaning that there > can only ever be one edge between two vertices. Many graphs like the road > network are in fact multigraphs, where many edges can connect two vertices > at the same time. > > Support for this could be added by introducing an Iterator<EdgeWritable> > getEdgeValue() or a similar construct. Maybe introducing a slim object like > a Connector between the edge and the vertex is also a good idea, so that > you could do something like: > > {code} > > for (final Connector<EdgeWritable, VertexWritable> conn: getEdgeValues(){ > > final EdgeWritable edge = conn.getEdge(); > > final VertexWritable otherVertex = conn.getOther(); > > doInterestingStuff(otherVertex); > > doMoreInterestingStuff(edge); > > } > > {code} > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators: > https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa > For more information on JIRA, see: http://www.atlassian.com/software/jira > > >