giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Reisman (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-221) Make iteration over edges more explicit
Date Thu, 28 Jun 2012 17:50:47 GMT


Eli Reisman commented on GIRAPH-221:

I was confused a few times and had to look in the API docs to find iterator() call. It could
be an iterator on anything. Not super confusing, but harder to remember for new users than
edgeIterator() or outEdgeIterator(). There are a number of little things like this that might
make the API more welcoming for new users. Watching some of the other interns I am working
with who are very new to Giraph struggle with some of the same little things like this I did
lately has made me more aware of this. 

Not a big deal, but anything we can do under the hood to make the application programming
incredibly easy will certainly encourage new potential users to jump in, in my opinion.

> Make iteration over edges more explicit
> ---------------------------------------
>                 Key: GIRAPH-221
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>          Components: graph
>            Reporter: Alessandro Presta
>            Assignee: Alessandro Presta
>            Priority: Minor
> Is there any particular reason why BasicVertex implements Iterable?
> It seems to me that doing
> {code:java}
> for (I neighbor : vertex)
> {code}
> is not that explicit, and
> {code:java}
> for (I neighbor : this)
> {code}
> gets even obscure (which may be why all examples in the codebase explicitly instantiate
an iterator and call next()).
> What I propose is a more explicit
> {code:java}
> Iterator<I> outEdgesIterator()
> {code}
> and also a convenient
> {code:java}
> Iterable<I> outEdges()
> {code}
> so, for example, an algorithm can use
> {code:java}
> for (IntWritable neighbor : outEdges())
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message