Package es.uam.eps.ir.relison.graph
Interface UndirectedUnweightedGraph<V>
- Type Parameters:
V- Type of vertices.
- All Superinterfaces:
Graph<V>,java.io.Serializable,UndirectedGraph<V>,UnweightedGraph<V>
- All Known Implementing Classes:
FastUndirectedUnweightedGraph,UndirectedJungGraph
public interface UndirectedUnweightedGraph<V> extends UnweightedGraph<V>, UndirectedGraph<V>
Interface for undirected unweighted 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, addNode, complement, containsEdge, containsVertex, getAdjacencyMatrix, getAdjacencyMatrixMap, getAdjacentNodesCount, getAllNodes, getEdgeCount, getEdgeType, getIncidentNodesCount, getIsolatedNodes, 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, outDegreeMethods inherited from interface es.uam.eps.ir.relison.graph.UnweightedGraph
addEdge, getAdjacentMutualNodesWeights, getEdgeWeight, getIncidentMutualNodesWeights, getMutualNodesWeights, isWeighted
-
Method Details
-
getIncidentNodesWeights
Description copied from interface:UnweightedGraphGiven 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 interfaceUnweightedGraph<V>- Parameters:
node- The node.- Returns:
- a stream of the incident nodes.
-
getAdjacentNodesWeights
Description copied from interface:UnweightedGraphGiven 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 interfaceUnweightedGraph<V>- Parameters:
node- The node.- Returns:
- a stream containing the adjacent nodes.
-
getNeighbourNodesWeights
Description copied from interface:UnweightedGraphGiven 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 interfaceUnweightedGraph<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.
-