Class ExplicitSubGraph<N,​E>

    • Constructor Detail

      • ExplicitSubGraph

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

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