Hi guys,
following the discussion for enhancing our interface in order to support big graphs, I
created a first draft:
This means adding the following methods, all with default implementations which
just delegate to our current set implementation.
```
Iterable<E> edgeSetIterable();
int numberOfEdges();
long numberOfEdgesAsLong();
Iterable<V> vertexSetIterable();
int numberOfVertices();
long numberOfVerticesAsLong();
Iterable<E> edgesOfIterable(V vertex);
long degreeOfAsLong(V vertex);
Iterable<E> incomingEdgesOfIterable(V vertex);
long inDegreeOfAsLong(V vertex);
Iterable<E> outgoingEdgesOfIterable(V vertex);
long outDegreeOfAsLong(V vertex);
```
A big graph implementation will be free to implement these differently and thus many algorithms will be able to execute without instantiating Sets. Some of our algorithms will need to be changed in order to use these methods instead of the Set versions.
In any case these changes are backward compatible.
Questions:
- Do we also add an iterable version of `Set<E> getAllEdges(V sourceVertex, V targetVertex)`?
- Do we also add an iterable version of `Set<E> removeAllEdges(V sourceVertex, V targetVertex)`?
- Better names?
- Other ideas?
Best,
Dimitrios