public interface IGraph<V,E> extends ICollection<IGraph<V,E>,V>
| Modifier and Type | Method and Description |
|---|---|
default IGraph<V,E> |
add(IEdge<V,E> edge) |
IGraph<V,E> |
add(V vertex) |
E |
edge(V from,
V to) |
Iterable<IEdge<V,E>> |
edges() |
ISet<V> |
in(V vertex)
In an undirected graph, this is equivalent to
out(Object). |
default OptionalLong |
indexOf(V vertex) |
boolean |
isDirected() |
default Iterator<V> |
iterator() |
default IGraph<V,E> |
link(V from,
V to) |
default IGraph<V,E> |
link(V from,
V to,
E edge) |
IGraph<V,E> |
link(V from,
V to,
E edge,
BinaryOperator<E> merge) |
<U> IGraph<V,U> |
mapEdges(Function<IEdge<V,E>,U> f) |
default IGraph<V,E> |
merge(IGraph<V,E> graph) |
default IGraph<V,E> |
merge(IGraph<V,E> graph,
BinaryOperator<E> merge) |
default V |
nth(long idx) |
ISet<V> |
out(V vertex)
In an undirected graph, this is equivalent to
in(Object). |
default IGraph<V,E> |
remove(IEdge<V,E> edge) |
IGraph<V,E> |
remove(V vertex) |
default IGraph<V,E> |
replace(V a,
V b) |
default IGraph<V,E> |
replace(V a,
V b,
BinaryOperator<E> merge) |
IGraph<V,E> |
select(ISet<V> vertices) |
default long |
size() |
default IList<? extends IGraph<V,E>> |
split(int parts)
Splits the collection into roughly even pieces, for parallel processing.
|
IGraph<V,E> |
transpose() |
IGraph<V,E> |
unlink(V from,
V to) |
BiPredicate<V,V> |
vertexEquality() |
ToLongFunction<V> |
vertexHash() |
ISet<V> |
vertices() |
clone, forked, isLinear, linear, nth, saveforEach, spliteratorE edge(V from, V to)
from and toIllegalArgumentException - if no such edge existsISet<V> in(V vertex)
out(Object).vertexIllegalArgumentException - if no such vertex existsISet<V> out(V vertex)
in(Object).vertexIllegalArgumentException - if no such vertex existsIGraph<V,E> link(V from, V to, E edge, BinaryOperator<E> merge)
from - the source of the edgeto - the destination of the edgeedge - the value of the edgemerge - the merge function for the edge values, if an edge already existsIGraph<V,E> remove(V vertex)
vertex removed, as well as all incoming and outgoing edgesdefault OptionalLong indexOf(V vertex)
vertex, if it's presentdefault V nth(long idx)
default long size()
IGraph<V,E> select(ISet<V> vertices)
default IGraph<V,E> replace(V a, V b, BinaryOperator<E> merge)
a - b - merge - boolean isDirected()
ToLongFunction<V> vertexHash()
BiPredicate<V,V> vertexEquality()
default IList<? extends IGraph<V,E>> split(int parts)
ICollectionparts subsets.split in interface ICollection<IGraph<V,E>,V>parts - the target number of piecesGraphs.connectedComponents(IGraph).