Interface DirectedNode

    • Method Detail

      • addIn

        void addIn​(DirectedEdge e)
        Adds an edge to the in adjacency list of the node.
        Parameters:
        e - A directed edge that terminates at the node.
        See Also:
        Node.add(Edge)
      • addOut

        void addOut​(DirectedEdge e)
        Adds an edge to the out adjacency list of the node.
        Parameters:
        e - A directed edge that originates from the node.
        See Also:
        Node.add(Edge)
      • removeIn

        void removeIn​(DirectedEdge e)
        Removes an edge from the in adjacency list of the node.
        Parameters:
        e - A directed edge that terminates at the node.
        See Also:
        Node.remove(Edge)
      • removeOut

        void removeOut​(DirectedEdge e)
        Removes an edge from the out adjacency list of node.
        Parameters:
        e - A directed edge that originates from the node.
        See Also:
        Node.remove(Edge)
      • getInEdge

        Edge getInEdge​(DirectedNode other)
        Returns an edge that terminates at the node and originates from a specified node.

        Note: It is possible for two nodes to share multiple edges between them. In this case, getInEdges(Node other) can be used to obtain a complete list.
        Parameters:
        other - The originating node.
        Returns:
        The first edge found to terminate at the node and originate from the specefied node.
        See Also:
        Node.getEdge(Node)
      • getInEdges

        List<? extends Edge> getInEdges​(DirectedNode other)
        Returns all edges that terminate at the node and originate from a specified node.
        Parameters:
        other - The originating node.
        Returns:
        All edges found to terminate at the node and originate from the specified node.
        See Also:
        Node.getEdges(Node)
      • getInEdges

        List<? extends Edge> getInEdges()
        Returns the in adjacency list of the node.
        Returns:
        A list of edges that terminate at the node.
        See Also:
        Node.getEdges()
      • getOutEdge

        Edge getOutEdge​(DirectedNode other)
        Returns an edge that originates at the node and terminates at a specified node.

        Note: It is possible for two nodes to share multiple edges between them. In this case, getOutEdges(Node other) can be used to obtain a complete list.
        Parameters:
        other - The terminating node.
        Returns:
        The first edge found to originate at the node and terminate at the specefied node.
        See Also:
        Node.getEdge(Node)
      • getOutEdges

        List<? extends Edge> getOutEdges​(DirectedNode other)
        Returns all edges that originate at the node and terminate from at specified node.
        Parameters:
        other - The temimnating node.
        Returns:
        All edges found to originate at the node and terminate at the specified node.
        See Also:
        Node.getEdges(Node)
      • getOutEdges

        List<? extends Edge> getOutEdges()
        Returns the out adjacency list of the node.
        Returns:
        A list of edges originating at the node.
        See Also:
        Node.getEdges()
      • getInDegree

        int getInDegree()
        Returns the in degree of the node.
        Returns:
        The number of edges that terminate at the node.
      • getOutDegree

        int getOutDegree()
        Returns the out degree of the node.
        Returns:
        The number of edges that originate at the node.