Interface Network<N,​E>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Set<E> adjacentEdges​(E edge)
      Returns the edges which have an incident node in common with edge.
      Set<N> adjacentNodes​(N node)
      Returns the nodes which have an incident edge in common with node in this network.
      boolean allowsParallelEdges()
      Returns true if this network allows parallel edges.
      boolean allowsSelfLoops()
      Returns true if this network allows self-loops (edges that connect a node to itself).
      Graph<N> asGraph()
      Returns a live view of this network as a Graph.
      int degree​(N node)
      Returns the count of node's incident edges, counting self-loops twice (equivalently, the number of times an edge touches node).
      E edgeConnectingOrNull​(EndpointPair<N> endpoints)
      Returns the single edge that directly connects endpoints (in the order, if any, specified by endpoints), if one is present, or null if no such edge exists.
      E edgeConnectingOrNull​(N nodeU, N nodeV)
      Returns the single edge that directly connects nodeU to nodeV, if one is present, or null if no such edge exists.
      ElementOrder<E> edgeOrder()
      Returns the order of iteration for the elements of edges().
      Set<E> edges()
      Returns all edges in this network, in the order specified by edgeOrder().
      Set<E> edgesConnecting​(EndpointPair<N> endpoints)
      Returns the set of edges that each directly connect endpoints (in the order, if any, specified by endpoints).
      Set<E> edgesConnecting​(N nodeU, N nodeV)
      Returns the set of edges that each directly connect nodeU to nodeV.
      boolean equals​(Object object)
      Returns true iff object is a Network that has the same elements and the same structural relationships as those in this network.
      boolean hasEdgeConnecting​(EndpointPair<N> endpoints)
      Returns true if there is an edge that directly connects endpoints (in the order, if any, specified by endpoints).
      boolean hasEdgeConnecting​(N nodeU, N nodeV)
      Returns true if there is an edge that directly connects nodeU to nodeV.
      int hashCode()
      Returns the hash code for this network.
      Set<E> incidentEdges​(N node)
      Returns the edges whose incident nodes in this network include node.
      EndpointPair<N> incidentNodes​(E edge)
      Returns the nodes which are the endpoints of edge in this network.
      int inDegree​(N node)
      Returns the count of node's incoming edges in a directed network.
      Set<E> inEdges​(N node)
      Returns all edges in this network which can be traversed in the direction (if any) of the edge to end at node.
      boolean isDirected()
      Returns true if the edges in this network are directed.
      ElementOrder<N> nodeOrder()
      Returns the order of iteration for the elements of nodes().
      Set<N> nodes()
      Returns all nodes in this network, in the order specified by nodeOrder().
      int outDegree​(N node)
      Returns the count of node's outgoing edges in a directed network.
      Set<E> outEdges​(N node)
      Returns all edges in this network which can be traversed in the direction (if any) of the edge starting from node.
      Set<N> predecessors​(N node)
      Returns all nodes in this network adjacent to node which can be reached by traversing node's incoming edges against the direction (if any) of the edge.
      Set<N> successors​(N node)
      Returns all nodes in this network adjacent to node which can be reached by traversing node's outgoing edges in the direction (if any) of the edge.