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 mutable directed graph that can have multiple edges between two vertices.
Author:
ActiveViam
  • Method Details

    • 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.