Interface FastMultiGraph<U>

Type Parameters:
U - type of the users.
All Superinterfaces:
FastGraph<U>, Graph<U>, MultiGraph<U>, ReducedIndex<U>, java.io.Serializable
All Known Implementing Classes:
AbstractFastMultiGraph, FastDirectedUnweightedMultiGraph, FastDirectedWeightedMultiGraph, FastUndirectedUnweightedMultiGraph, FastUndirectedWeightedMultiGraph

public interface FastMultiGraph<U>
extends FastGraph<U>, MultiGraph<U>
Interface for fast implementations of multi-graphs.
  • Method Details

    • getNeighbourhoodWeightsLists

      java.util.stream.Stream<MultiEdgeWeights> getNeighbourhoodWeightsLists​(int uidx, EdgeOrientation orientation)
      Gets the different weights for the edges of the selected neighbour nodes of a node.
      Parameters:
      uidx - The identifier of the node to study
      orientation - The orientation to take
      Returns:
      A stream containing the weights
    • getNeighbourhoodTypesLists

      java.util.stream.Stream<MultiEdgeTypes> getNeighbourhoodTypesLists​(int uidx, EdgeOrientation orientation)
      Gets the different types for the edges of the selected neighbour nodes of a node.
      Parameters:
      uidx - The identifier of the node to study
      orientation - The orientation to take
      Returns:
      A stream containing the types
    • getNumEdges

      int getNumEdges​(int uidx, int vidx)
      Obtains the number of edges between a pair of vertices.
      Parameters:
      uidx - the identifier of the source node.
      vidx - the identifier of the destination node.
      Returns:
      the number of edges between the pair of nodes.
    • getEdgeWeights

      java.util.List<java.lang.Double> getEdgeWeights​(int uidx, int vidx)
      Obtains the list of weights of the edges between a pair of vertices.
      Parameters:
      uidx - the identifier of the source node.
      vidx - the identifier of the destination node.
      Returns:
      the list of weights of the edges between the pair of nodes.
    • getEdgeTypes

      java.util.List<java.lang.Integer> getEdgeTypes​(int uidx, int vidx)
      Obtains the list of types of the edges between a pair of vertices.
      Parameters:
      uidx - the identifier of the source node.
      vidx - the identifier of the destination node.
      Returns:
      the list of types of the edges between the pair of nodes.
    • updateEdgeWeight

      boolean updateEdgeWeight​(U orig, U dest, double weight, int idx)
      Updates the weight of an edge from the graph.
      Parameters:
      orig - The incident node of the edge to remove.
      dest - The adjacent node of the edge to remove.
      weight - the new weight for the edge.
      idx - The number of the edge to remove.
      Returns:
      true if everything went ok, false if not.