Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Is there any particular reason why BasicVertex implements Iterable?
It seems to me that doing
for (I neighbor : vertex)
is not that explicit, and
for (I neighbor : this)
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
Iterator<I> outEdgesIterator()
and also a convenient
Iterable<I> outEdges()
so, for example, an algorithm can use
for (IntWritable neighbor : outEdges())
Attachments
Attachments
Issue Links
- relates to
-
GIRAPH-244 Vertex API redesign
- Resolved