Interface UndirectedMultiGraph<V>

Type Parameters:
V - Type of the vertices.
All Superinterfaces:
Graph<V>, MultiGraph<V>, java.io.Serializable, UndirectedGraph<V>
All Known Subinterfaces:
UndirectedUnweightedMultiGraph<V>, UndirectedWeightedMultiGraph<V>
All Known Implementing Classes:
FastUndirectedUnweightedMultiGraph, FastUndirectedWeightedMultiGraph

public interface UndirectedMultiGraph<V>
extends MultiGraph<V>, UndirectedGraph<V>
Interface for undirected graphs.
  • Method Details

    • getIncidentNodesTypes

      default java.util.stream.Stream<Weight<V,​java.lang.Integer>> getIncidentNodesTypes​(V node)
      Description copied from interface: Graph
      Given a node, finds the types of the edges from the nodes u such that the edge (u to node) is in the graph.
      Specified by:
      getIncidentNodesTypes in interface Graph<V>
      Specified by:
      getIncidentNodesTypes in interface UndirectedGraph<V>
      Parameters:
      node - The node.
      Returns:
      A stream of the incident nodes and types.
    • getAdjacentNodesTypes

      default java.util.stream.Stream<Weight<V,​java.lang.Integer>> getAdjacentNodesTypes​(V node)
      Description copied from interface: Graph
      Given a node, finds the types of the edges towards the nodes u such that the edge (node to u) is in the graph.
      Specified by:
      getAdjacentNodesTypes in interface Graph<V>
      Specified by:
      getAdjacentNodesTypes in interface UndirectedGraph<V>
      Parameters:
      node - The node.
      Returns:
      A stream containing the adjacent nodes and types.
    • getNeighbourhoodTypes

      default java.util.stream.Stream<Weight<V,​java.lang.Integer>> getNeighbourhoodTypes​(V node, EdgeOrientation direction)
      Description copied from interface: Graph
      Gets all the types of the edges in the neighbourhood of a node given by a direction. In the mutual case, it does not work (types are categorical values), so an empty stream is returned.
      Specified by:
      getNeighbourhoodTypes in interface Graph<V>
      Specified by:
      getNeighbourhoodTypes in interface UndirectedGraph<V>
      Parameters:
      node - The node.
      direction - The direction of the links.
      Returns:
      A stream containing the corresponding neighbourhood.
    • getIncidentNodesTypesLists

      default java.util.stream.Stream<Weights<V,​java.lang.Integer>> getIncidentNodesTypesLists​(V node)
      Description copied from interface: MultiGraph
      Gets the different weights for the edges of the incident nodes.
      Specified by:
      getIncidentNodesTypesLists in interface MultiGraph<V>
      Parameters:
      node - The node to study
      Returns:
      A stream containing the weights
    • getAdjacentNodesTypesLists

      default java.util.stream.Stream<Weights<V,​java.lang.Integer>> getAdjacentNodesTypesLists​(V node)
      Description copied from interface: MultiGraph
      Gets the different weights for the edges of the adjacent nodes.
      Specified by:
      getAdjacentNodesTypesLists in interface MultiGraph<V>
      Parameters:
      node - The node to study
      Returns:
      A stream containing the weights
    • getNeighbourhoodTypesLists

      default java.util.stream.Stream<Weights<V,​java.lang.Integer>> getNeighbourhoodTypesLists​(V node, EdgeOrientation direction)
      Description copied from interface: MultiGraph
      Gets the different weights for the edges of the selected neighbour nodes.
      Specified by:
      getNeighbourhoodTypesLists in interface MultiGraph<V>
      Parameters:
      node - The node to study
      direction - The orientation to take
      Returns:
      A stream containing the weights
    • degree

      default int degree​(V node)
      Description copied from interface: Graph
      Calculates the degree of a node.
      Specified by:
      degree in interface Graph<V>
      Specified by:
      degree in interface UndirectedGraph<V>
      Parameters:
      node - The node.
      Returns:
      the degree of the node if it is contained in the graph, -1 otherwise.