Package es.uam.eps.ir.relison.graph
Interface UndirectedWeightedGraph<V>
- Type Parameters:
V- Type of vertices.
- All Superinterfaces:
Graph<V>,java.io.Serializable,UndirectedGraph<V>,WeightedGraph<V>
- All Known Implementing Classes:
FastUndirectedWeightedGraph
public interface UndirectedWeightedGraph<V> extends WeightedGraph<V>, UndirectedGraph<V>
Interface for undirected weighted graphs.
-
Method Summary
Modifier and Type Method Description default java.util.stream.Stream<Weight<V,java.lang.Double>>getAdjacentNodesWeights(V node)Given a node, finds all the nodes u such that the edge (node to u) is in the graph.default java.util.stream.Stream<Weight<V,java.lang.Double>>getIncidentNodesWeights(V node)Given a node, finds all the nodes u such that the edge (u to node) is in the graph.default java.util.stream.Stream<Weight<V,java.lang.Double>>getNeighbourhoodWeights(V node, EdgeOrientation direction)Gets all the weights of the edges in the neighbourhood of a node given by a direction.default java.util.stream.Stream<Weight<V,java.lang.Double>>getNeighbourNodesWeights(V node)Given a node, finds all the nodes u so that either (node to u) or (u to node) are in the graph.Methods inherited from interface es.uam.eps.ir.relison.graph.Graph
addEdge, addEdge, addEdge, addEdge, addEdge, addEdge, addNode, complement, containsEdge, containsVertex, getAdjacencyMatrix, getAdjacencyMatrixMap, getAdjacentMutualNodesWeights, getAdjacentNodesCount, getAllNodes, getEdgeCount, getEdgeType, getEdgeWeight, getIncidentMutualNodesWeights, getIncidentNodesCount, getIsolatedNodes, getMutualNodesWeights, getNeighbourNodes, getNeighbourNodesCount, getNeighbourNodesTypes, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, hasNeighbors, isMultigraph, removeEdge, removeNode, updateEdgeType, updateEdgeWeightMethods inherited from interface es.uam.eps.ir.relison.graph.UndirectedGraph
degree, degree, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentNodes, getAdjacentNodesTypes, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentNodes, getIncidentNodesTypes, getMutualEdgesCount, getMutualNodes, getMutualNodesCount, getMutualNodesTypes, getNeighbourEdgesCount, getNeighbourhood, getNeighbourhoodSize, getNeighbourhoodTypes, inDegree, isDirected, isMutual, mutualDegree, outDegree
-
Method Details
-
getIncidentNodesWeights
Description copied from interface:WeightedGraphGiven a node, finds all the nodes u such that the edge (u to node) is in the graph.- Specified by:
getIncidentNodesWeightsin interfaceGraph<V>- Specified by:
getIncidentNodesWeightsin interfaceUndirectedGraph<V>- Specified by:
getIncidentNodesWeightsin interfaceWeightedGraph<V>- Parameters:
node- The node.- Returns:
- A stream of the incident nodes.
-
getAdjacentNodesWeights
Description copied from interface:WeightedGraphGiven a node, finds all the nodes u such that the edge (node to u) is in the graph.- Specified by:
getAdjacentNodesWeightsin interfaceGraph<V>- Specified by:
getAdjacentNodesWeightsin interfaceUndirectedGraph<V>- Specified by:
getAdjacentNodesWeightsin interfaceWeightedGraph<V>- Parameters:
node- The node.- Returns:
- A stream containing the adjacent nodes.
-
getNeighbourNodesWeights
Description copied from interface:WeightedGraphGiven a node, finds all the nodes u so that either (node to u) or (u to node) are in the graph.- Specified by:
getNeighbourNodesWeightsin interfaceGraph<V>- Specified by:
getNeighbourNodesWeightsin interfaceWeightedGraph<V>- Parameters:
node- The node.- Returns:
- A stream containing all the nodes in the neighbourhood.
-
getNeighbourhoodWeights
default java.util.stream.Stream<Weight<V,java.lang.Double>> getNeighbourhoodWeights(V node, EdgeOrientation direction)Description copied from interface:GraphGets all the weights of the edges in the neighbourhood of a node given by a direction. In the mutual case, just returns the average of the edge weights.- Specified by:
getNeighbourhoodWeightsin interfaceGraph<V>- Specified by:
getNeighbourhoodWeightsin interfaceUndirectedGraph<V>- Parameters:
node- The node.direction- The direction of the links- Returns:
- A stream containing the corresponding neighbourhood and weights.
-