Interface UndirectedMultiGraph<V>
- Type Parameters:
V- Type of the vertices.
- All Superinterfaces:
Graph<V>,MultiGraph<V>,java.io.Serializable,UndirectedGraph<V>
- All Known Subinterfaces:
UndirectedUnweightedMultiGraph<V>,UndirectedWeightedMultiGraph<V>
- All Known Implementing Classes:
FastUndirectedUnweightedMultiGraph,FastUndirectedWeightedMultiGraph
public interface UndirectedMultiGraph<V> extends MultiGraph<V>, UndirectedGraph<V>
Interface for undirected graphs.
-
Method Summary
Modifier and Type Method Description default intdegree(V node)Calculates the degree of a node.default java.util.stream.Stream<Weight<V,java.lang.Integer>>getAdjacentNodesTypes(V node)Given a node, finds the types of the edges towards the nodes u such that the edge (node to u) is in the graph.default java.util.stream.Stream<Weights<V,java.lang.Integer>>getAdjacentNodesTypesLists(V node)Gets the different weights for the edges of the adjacent nodes.default java.util.stream.Stream<Weight<V,java.lang.Integer>>getIncidentNodesTypes(V node)Given a node, finds the types of the edges from the nodes u such that the edge (u to node) is in the graph.default java.util.stream.Stream<Weights<V,java.lang.Integer>>getIncidentNodesTypesLists(V node)Gets the different weights for the edges of the incident nodes.default java.util.stream.Stream<Weight<V,java.lang.Integer>>getNeighbourhoodTypes(V node, EdgeOrientation direction)Gets all the types of the edges in the neighbourhood of a node given by a direction.default java.util.stream.Stream<Weights<V,java.lang.Integer>>getNeighbourhoodTypesLists(V node, EdgeOrientation direction)Gets the different weights for the edges of the selected neighbour nodes.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, getNeighbourNodesWeights, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, hasNeighbors, isWeighted, removeEdge, removeNode, updateEdgeType, updateEdgeWeightMethods inherited from interface es.uam.eps.ir.relison.graph.multigraph.MultiGraph
getAdjacentNodesWeightsLists, getEdgeTypes, getEdgeWeights, getIncidentNodesWeightsLists, getNeighbourhoodWeightsLists, getNeighbourNodesTypesLists, getNeighbourNodesWeightsLists, getNumEdges, isMultigraph, removeEdge, removeEdges, updateEdgeWeightMethods inherited from interface es.uam.eps.ir.relison.graph.UndirectedGraph
degree, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentNodes, getAdjacentNodesWeights, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentNodes, getIncidentNodesWeights, getMutualEdgesCount, getMutualNodes, getMutualNodesCount, getMutualNodesTypes, getNeighbourEdgesCount, getNeighbourhood, getNeighbourhoodSize, getNeighbourhoodWeights, inDegree, isDirected, isMutual, mutualDegree, outDegree
-
Method Details
-
getIncidentNodesTypes
Description copied from interface:GraphGiven a node, finds the types of the edges from the nodes u such that the edge (u to node) is in the graph.- Specified by:
getIncidentNodesTypesin interfaceGraph<V>- Specified by:
getIncidentNodesTypesin interfaceUndirectedGraph<V>- Parameters:
node- The node.- Returns:
- A stream of the incident nodes and types.
-
getAdjacentNodesTypes
Description copied from interface:GraphGiven a node, finds the types of the edges towards the nodes u such that the edge (node to u) is in the graph.- Specified by:
getAdjacentNodesTypesin interfaceGraph<V>- Specified by:
getAdjacentNodesTypesin interfaceUndirectedGraph<V>- Parameters:
node- The node.- Returns:
- A stream containing the adjacent nodes and types.
-
getNeighbourhoodTypes
default java.util.stream.Stream<Weight<V,java.lang.Integer>> getNeighbourhoodTypes(V node, EdgeOrientation direction)Description copied from interface:GraphGets all the types of the edges in the neighbourhood of a node given by a direction. In the mutual case, it does not work (types are categorical values), so an empty stream is returned.- Specified by:
getNeighbourhoodTypesin interfaceGraph<V>- Specified by:
getNeighbourhoodTypesin interfaceUndirectedGraph<V>- Parameters:
node- The node.direction- The direction of the links.- Returns:
- A stream containing the corresponding neighbourhood.
-
getIncidentNodesTypesLists
Description copied from interface:MultiGraphGets the different weights for the edges of the incident nodes.- Specified by:
getIncidentNodesTypesListsin interfaceMultiGraph<V>- Parameters:
node- The node to study- Returns:
- A stream containing the weights
-
getAdjacentNodesTypesLists
Description copied from interface:MultiGraphGets the different weights for the edges of the adjacent nodes.- Specified by:
getAdjacentNodesTypesListsin interfaceMultiGraph<V>- Parameters:
node- The node to study- Returns:
- A stream containing the weights
-
getNeighbourhoodTypesLists
default java.util.stream.Stream<Weights<V,java.lang.Integer>> getNeighbourhoodTypesLists(V node, EdgeOrientation direction)Description copied from interface:MultiGraphGets the different weights for the edges of the selected neighbour nodes.- Specified by:
getNeighbourhoodTypesListsin interfaceMultiGraph<V>- Parameters:
node- The node to studydirection- The orientation to take- Returns:
- A stream containing the weights
-
degree
Description copied from interface:GraphCalculates the degree of a node.
-