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
Represent a mutable
directed graph that can have multiple edges between
two vertices.- Author:
- ActiveViam
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an edge between two nodes.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, setNodeMethods 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 Details
-
addEdge
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.
-