Package com.qfs.graph
Interface IDirectedMultiGraph<K,V,E>
-
- Type Parameters:
K- the type of the keys for the vertices.V- the type of the content for the vertices.E- the type of the edges. Edge convention: a null value for an edge between two nodes is interpreted as the absence of edges between these two nodes.
- All Superinterfaces:
IDirectedGraph<K,V,Collection<E>>,Map<K,V>
- All Known Implementing Classes:
DirectedMultiGraph,UnmodifiableDirectedMultiGraph,UserStoreGraph
public interface IDirectedMultiGraph<K,V,E> extends IDirectedGraph<K,V,Collection<E>>
Represent a mutabledirected graphthat can have multiple edges between two vertices.- Author:
- ActiveViam
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEdge(K from, K to, E edge)Add an edge between two nodes.Collection<E>getSingleEdges()Give all the separate edges of the graph, producing multiple items when there are multiple edges between two nodes.-
Methods inherited from interface com.qfs.graph.IDirectedGraph
addNode, filterEdges, forEachNode, getEdge, getEdges, getEdgesFrom, getEdgesTo, getNodes, getReached, getReachers, getTo, hasEdge, isAcyclic, moveKey, removeEdge, removeNode, setEdge, setNode
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
addEdge
void addEdge(K from, K to, E edge)
Add an edge between two nodes.- Parameters:
from- the node from which this edge should start.to- the node to which this edge should go.edge- the value held by this edge.
-
getSingleEdges
Collection<E> getSingleEdges()
Give all the separate edges of the graph, producing multiple items when there are multiple edges between two nodes.- Returns:
- the separate edges of the graph.
-
-