Interface WeightedMultiEdges

All Superinterfaces:
MultiEdges
All Known Implementing Classes:
FastDirectedWeightedMultiEdges, FastUndirectedWeightedMultiEdges

public interface WeightedMultiEdges
extends MultiEdges
Interface for weighted edges
  • Method Details

    • getIncidentWeights

      default java.util.stream.Stream<MultiEdgeWeights> getIncidentWeights​(int node)
      Given a node, finds all the weights of edges such that the edge (u to node) is in the graph.
      Specified by:
      getIncidentWeights in interface MultiEdges
      Parameters:
      node - The node.
      Returns:
      A stream of the weights of incident nodes.
    • getAdjacentWeights

      default java.util.stream.Stream<MultiEdgeWeights> getAdjacentWeights​(int node)
      Given a node, finds all the weights of edges u such that the edge (node to u) is in the graph.
      Specified by:
      getAdjacentWeights in interface MultiEdges
      Parameters:
      node - The node
      Returns:
      A stream containing the weights adjacent nodes.
    • getNeighbourWeights

      default java.util.stream.Stream<MultiEdgeWeights> getNeighbourWeights​(int node)
      Given a node, finds all the all the weights of edges so that either (node to u) or (u to node) are in the graph.
      Specified by:
      getNeighbourWeights in interface MultiEdges
      Parameters:
      node - The node
      Returns:
      A stream containing all the weights of the nodes in the neighbourhood.
    • getMutualWeights

      default java.util.stream.Stream<MultiEdgeWeights> getMutualWeights​(int node)
      Given a node, finds all the all the weights of edges so that both (node to u) and (u to node) are in the graph.
      Specified by:
      getMutualWeights in interface MultiEdges
      Parameters:
      node - The node
      Returns:
      A stream containing all the weights of the nodes in the neighbourhood.