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, updateEdgeWeight
Methods 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
Methods inherited from interface es.uam.eps.ir.relison.graph.UnweightedGraph
addEdge, getAdjacentMutualNodesWeights, getEdgeWeight, getIncidentMutualNodesWeights, getMutualNodesWeights, isWeighted
-
Method Details
-
getIncidentNodesWeights
Description copied from interface:UnweightedGraph
Given a node, finds all the nodes u such that the edge (u to node) is in the graph.- Specified by:
getIncidentNodesWeights
in interfaceGraph<V>
- Specified by:
getIncidentNodesWeights
in interfaceUndirectedGraph<V>
- Specified by:
getIncidentNodesWeights
in interfaceUnweightedGraph<V>
- Parameters:
node
- The node.- Returns:
- a stream of the incident nodes.
-
getAdjacentNodesWeights
Description copied from interface:UnweightedGraph
Given a node, finds all the nodes u such that the edge (node to u) is in the graph.- Specified by:
getAdjacentNodesWeights
in interfaceGraph<V>
- Specified by:
getAdjacentNodesWeights
in interfaceUndirectedGraph<V>
- Specified by:
getAdjacentNodesWeights
in interfaceUnweightedGraph<V>
- Parameters:
node
- The node.- Returns:
- a stream containing the adjacent nodes.
-
getNeighbourNodesWeights
Description copied from interface:UnweightedGraph
Given a node, finds all the nodes u so that either (node to u) or (u to node) are in the graph.- Specified by:
getNeighbourNodesWeights
in interfaceGraph<V>
- Specified by:
getNeighbourNodesWeights
in 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:Graph
Gets 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:
getNeighbourhoodWeights
in interfaceGraph<V>
- Specified by:
getNeighbourhoodWeights
in interfaceUndirectedGraph<V>
- Parameters:
node
- The node.direction
- The direction of the links- Returns:
- A stream containing the corresponding neighbourhood and weights.
-