Interface DirectedGraph<V,E>

Type Parameters:
V - Vertex type
E - Edge type
All Known Implementing Classes:
AttributedDirectedGraph, DefaultDirectedGraph

public interface DirectedGraph<V,E>
Directed graph.
  • Method Details

    • addVertex

      boolean addVertex(V vertex)
      Adds a vertex to this graph.
      vertex - Vertex
      Whether vertex was added
    • addEdge

      @Nullable E addEdge(V vertex, V targetVertex)
      Adds an edge to this graph.
      vertex - Source vertex
      targetVertex - Target vertex
      New edge, if added, otherwise null
      IllegalArgumentException - if either vertex is not already in graph
    • getEdge

      @Nullable E getEdge(V source, V target)
    • removeEdge

      boolean removeEdge(V vertex, V targetVertex)
    • vertexSet

      Set<? extends V> vertexSet()
    • removeAllVertices

      void removeAllVertices(Collection<V> collection)
      Removes from this graph all vertices that are in collection, and the edges into and out of those vertices.
    • getOutwardEdges

      List<E> getOutwardEdges(V source)
    • getInwardEdges

      List<E> getInwardEdges(V vertex)
    • edgeSet

      Set<E> edgeSet()