Class FastUndirectedWeightedMultiGraph<U>

java.lang.Object
es.uam.eps.ir.relison.graph.multigraph.fast.AbstractFastMultiGraph<U>
es.uam.eps.ir.relison.graph.multigraph.fast.FastUndirectedWeightedMultiGraph<U>
Type Parameters:
U - type of the nodes
All Implemented Interfaces:
FastGraph<U>, Graph<U>, FastMultiGraph<U>, MultiGraph<U>, UndirectedMultiGraph<U>, UndirectedWeightedMultiGraph<U>, WeightedMultiGraph<U>, UndirectedGraph<U>, WeightedGraph<U>, ReducedIndex<U>, java.io.Serializable

public class FastUndirectedWeightedMultiGraph<U>
extends AbstractFastMultiGraph<U>
implements UndirectedWeightedMultiGraph<U>
Fast implementation for an Undirected Weighted multigraph.
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getAdjacencyMatrix

      public double[][] getAdjacencyMatrix​(EdgeOrientation direction)
      Description copied from interface: Graph
      Gets the adjacency matrix.
      Specified by:
      getAdjacencyMatrix in interface Graph<U>
      Parameters:
      direction - The direction of the edges.
      Returns:
      the adjacency matrix.
    • getAdjacencyMatrixMTJ

      public no.uib.cipr.matrix.Matrix getAdjacencyMatrixMTJ​(EdgeOrientation direction)
      Builds the matrix for the MTJ framework.
      Parameters:
      direction - orientation of the edges.
      Returns:
      the matrix.
    • getAdjacentMutualNodesWeights

      public java.util.stream.Stream<Weight<U,​java.lang.Double>> getAdjacentMutualNodesWeights​(U node)
      Description copied from interface: Graph
      Given a node, finds the weights of the edges towards the nodes u such that the edge (node to u) and the edge (u to node) are in the graph.
      Specified by:
      getAdjacentMutualNodesWeights in interface Graph<U>
      Parameters:
      node - The node.
      Returns:
      A stream containing all the nodes in the neighbourhood and weights.
    • getIncidentMutualNodesWeights

      public java.util.stream.Stream<Weight<U,​java.lang.Double>> getIncidentMutualNodesWeights​(U node)
      Description copied from interface: Graph
      Given a node, finds the weights of the edges from the nodes u such that the edge (node to u) and the edge (u to node) are in the graph.
      Specified by:
      getIncidentMutualNodesWeights in interface Graph<U>
      Parameters:
      node - The node.
      Returns:
      A stream containing all the nodes in the neighbourhood and weights.
    • getMutualNodesWeights

      public java.util.stream.Stream<Weight<U,​java.lang.Double>> getMutualNodesWeights​(U node)
      Description copied from interface: Graph
      Given a node, finds the weights of the edges towards and from the nodes u such that the edge (node to u) and the edge (u to node) are in the graph. It finds the average value of the outgoing and incoming links.
      Specified by:
      getMutualNodesWeights in interface Graph<U>
      Parameters:
      node - The node.
      Returns:
      A stream containing all the nodes in the neighbourhood and weights.