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 Summary
Modifier and Type Method Description java.util.List<java.lang.Integer>
getEdgeTypes(int uidx, int vidx)
Obtains the list of types of the edges between a pair of vertices.java.util.List<java.lang.Double>
getEdgeWeights(int uidx, int vidx)
Obtains the list of weights of the edges between a pair of vertices.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.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.int
getNumEdges(int uidx, int vidx)
Obtains the number of edges between a pair of vertices.boolean
updateEdgeWeight(U orig, U dest, double weight, int idx)
Updates the weight of an edge from the graph.Methods inherited from interface es.uam.eps.ir.relison.graph.fast.FastGraph
addEdge, containsEdge, getAllNodesIds, getEdgeWeight, getIndex, getIsolatedNodeIds, getNeighborhood, getNeighborhoodTypes, getNeighborhoodWeights, getNodesIdsWithEdges, updateEdgeWeight
Methods inherited from interface es.uam.eps.ir.relison.graph.Graph
addEdge, addEdge, addEdge, addEdge, addEdge, addEdge, addNode, complement, containsEdge, containsVertex, degree, degree, getAdjacencyMatrix, getAdjacencyMatrixMap, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentMutualNodesWeights, getAdjacentNodes, getAdjacentNodesCount, getAdjacentNodesTypes, getAdjacentNodesWeights, getAllNodes, getEdgeCount, getEdgeType, getEdgeWeight, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentMutualNodesWeights, getIncidentNodes, getIncidentNodesCount, getIncidentNodesTypes, getIncidentNodesWeights, getIsolatedNodes, getMutualEdgesCount, getMutualNodes, getMutualNodesCount, getMutualNodesTypes, getMutualNodesWeights, getNeighbourEdgesCount, getNeighbourhood, getNeighbourhoodSize, getNeighbourhoodTypes, getNeighbourhoodWeights, getNeighbourNodes, getNeighbourNodesCount, getNeighbourNodesTypes, getNeighbourNodesWeights, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, hasNeighbors, inDegree, isDirected, isMutual, isWeighted, mutualDegree, outDegree, removeEdge, removeNode, updateEdgeType, updateEdgeWeight
Methods inherited from interface es.uam.eps.ir.relison.graph.multigraph.MultiGraph
getAdjacentNodesTypesLists, getAdjacentNodesWeightsLists, getEdgeTypes, getEdgeWeights, getIncidentNodesTypesLists, getIncidentNodesWeightsLists, getNeighbourhoodTypesLists, getNeighbourhoodWeightsLists, getNeighbourNodesTypesLists, getNeighbourNodesWeightsLists, getNumEdges, isMultigraph, removeEdge, removeEdges, updateEdgeWeight
-
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 studyorientation
- 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 studyorientation
- 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
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.
-