Class ExplicitSubGraph<N,E>

java.lang.Object
cdc.graphs.impl.GraphFilter<N,E>
cdc.graphs.impl.ExplicitSubGraph<N,E>
Type Parameters:
N - Node class
E - Edge class
All Implemented Interfaces:
GraphAdapter<N,E>
Direct Known Subclasses:
ExtensionSubGraph, RestrictionSubGraph

public abstract class ExplicitSubGraph<N,E> extends GraphFilter<N,E>
Base class use to construct subgraphs by explicitly defining their content.
Author:
Damien Carbonne
See Also:
  • Constructor Details

    • ExplicitSubGraph

      protected ExplicitSubGraph(GraphAdapter<N,E> delegate)
  • Method Details

    • clear

      public abstract void clear()
      Make the subgraph empty.
    • isEmpty

      public abstract boolean isEmpty()
      Return whether the subgraph is empty or not.
      Returns:
      whether the subgraph is empty or not.
    • addNode

      public abstract void addNode(N node)
      Add a node to the subgraph.
      Parameters:
      node - The node to add. Must belong to delegate.
    • removeNode

      public abstract void removeNode(N node)
      Remove one node and the associated edges. If node does not belong to subgraph, does nothing.
      Parameters:
      node - The node to remove.
    • addEdge

      public abstract void addEdge(E edge)
      Add an edge and the associated nodes to the subgraph.
      Parameters:
      edge - The edge to add. Must belong to delegate.
    • removeEdge

      public abstract void removeEdge(E edge)
      Remove one edge. If edge does not belong to subgraph, does nothing.
      Parameters:
      edge - The edge to remove.
    • removeEdges

      public abstract void removeEdges(N source, N target)
      Remove all edges between a source and a target node. If source or edge does not belong to subgraph, does nothing.
      Parameters:
      source - The source node.
      target - The target node.