Interface MutableEdgeLabelledDirectedGraph<N,​L>

    • Method Detail

      • addEdge

        void addEdge​(N from,
                     N to,
                     L label)
        Adds an edge to the graph between 2 nodes. If the edge is already present no change is made.
        Parameters:
        from - out node for the edge.
        to - in node for the edge.
        label - label for the edge.
      • removeEdge

        void removeEdge​(N from,
                        N to,
                        L label)
        Removes an edge between 2 nodes in the graph. If the edge is not present no change is made.
        Parameters:
        from - out node for the edges to remove.
        to - in node for the edges to remove.
        label - label for the edge to remove.
      • removeAllEdges

        void removeAllEdges​(N from,
                            N to)
        Removes all edges between 2 nodes in the graph. If no edges are present, no change is made.
        Parameters:
        from - out node for the edges to remove.
        to - in node for the edges to remove.
      • removeAllEdges

        void removeAllEdges​(L label)
        Removes all edges with the given label in the graph. If no edges are present, no change is made.
        Parameters:
        label - label for the edge to remove.
      • addNode

        void addNode​(N node)
        Adds a node to the graph. Initially the added node has no successors or predecessors. ; as a consequence it is considered both a head and tail for the graph.
        Parameters:
        node - a node to add to the graph.
        See Also:
        DirectedGraph.getHeads(), DirectedGraph.getTails()
      • removeNode

        void removeNode​(N node)
        Removes a node from the graph. If the node is not found in the graph, no change is made.
        Parameters:
        node - the node to be removed.