Interface UndirectedMultiEdges
- All Superinterfaces:
MultiEdges
- All Known Implementing Classes:
FastUndirectedUnweightedMultiEdges
,FastUndirectedWeightedMultiEdges
public interface UndirectedMultiEdges extends MultiEdges
Class for the undirected multi-edges.
-
Method Summary
Modifier and Type Method Description default java.util.stream.Stream<java.lang.Integer>
getAdjacentNodes(int node)
Gets the outgoing neighbourhood of a node.default java.util.stream.Stream<MultiEdgeTypes>
getAdjacentTypes(int node)
Gets the types of the adjacent edges of a node.default java.util.stream.Stream<java.lang.Integer>
getIncidentNodes(int node)
Gets the incoming neighbourhood of a node.default java.util.stream.Stream<MultiEdgeTypes>
getIncidentTypes(int node)
Gets the types of the incident edges of a node.default java.util.stream.Stream<java.lang.Integer>
getMutualNodes(int node)
Gets the neighbors of the user with whom he has both incoming and outgoing links.default java.util.stream.Stream<MultiEdgeTypes>
getMutualTypes(int node)
Gets the types of the neighbourhood edges of a node.default int
getNeighbourCount(int node)
Gets the number of edges which reach or start in a certain nodedefault java.util.stream.IntStream
getNodesWithAdjacentEdges()
Obtains the set of nodes which have adjacent edges.default java.util.stream.IntStream
getNodesWithIncidentEdges()
Obtains the set of nodes which have incident edges.default java.util.stream.IntStream
getNodesWithMutualEdges()
Obtains the set of nodes which have, at least, a reciprocal edge.Methods inherited from interface es.uam.eps.ir.relison.graph.multigraph.edges.MultiEdges
addEdge, addUser, containsEdge, getAdjacentCount, getAdjacentWeights, getEdgeTypes, getEdgeWeights, getIncidentCount, getIncidentWeights, getIsolatedNodes, getMutualWeights, getNeighbourNodes, getNeighbourTypes, getNeighbourWeights, getNodesWithEdges, getNumEdges, getNumEdges, hasAdjacentEdges, hasEdges, hasIncidentEdges, hasMutualEdges, removeEdge, removeEdges, removeNode, updateEdgeType, updateEdgeWeight
-
Method Details
-
getIncidentNodes
default java.util.stream.Stream<java.lang.Integer> getIncidentNodes(int node)Description copied from interface:MultiEdges
Gets the incoming neighbourhood of a node.- Specified by:
getIncidentNodes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream of all the ids of nodes.
-
getAdjacentNodes
default java.util.stream.Stream<java.lang.Integer> getAdjacentNodes(int node)Description copied from interface:MultiEdges
Gets the outgoing neighbourhood of a node.- Specified by:
getAdjacentNodes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream containing all the ids of the nodes.
-
getMutualNodes
default java.util.stream.Stream<java.lang.Integer> getMutualNodes(int node)Description copied from interface:MultiEdges
Gets the neighbors of the user with whom he has both incoming and outgoing links.- Specified by:
getMutualNodes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream containing the ids of the mutual neighborhood.
-
getIncidentTypes
Description copied from interface:MultiEdges
Gets the types of the incident edges of a node.- Specified by:
getIncidentTypes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream containing all the edge types.
-
getAdjacentTypes
Description copied from interface:MultiEdges
Gets the types of the adjacent edges of a node.- Specified by:
getAdjacentTypes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream containing all the edge types.
-
getMutualTypes
Description copied from interface:MultiEdges
Gets the types of the neighbourhood edges of a node.- Specified by:
getMutualTypes
in interfaceMultiEdges
- Parameters:
node
- The node.- Returns:
- a stream containing all the edge types.
-
getNeighbourCount
default int getNeighbourCount(int node)Description copied from interface:MultiEdges
Gets the number of edges which reach or start in a certain node- Specified by:
getNeighbourCount
in interfaceMultiEdges
- Parameters:
node
- the node- Returns:
- the number of edges which reach or start in that node
-
getNodesWithIncidentEdges
default java.util.stream.IntStream getNodesWithIncidentEdges()Description copied from interface:MultiEdges
Obtains the set of nodes which have incident edges.- Specified by:
getNodesWithIncidentEdges
in interfaceMultiEdges
- Returns:
- a stream containing the ids of nodes with incident edges
-
getNodesWithAdjacentEdges
default java.util.stream.IntStream getNodesWithAdjacentEdges()Description copied from interface:MultiEdges
Obtains the set of nodes which have adjacent edges.- Specified by:
getNodesWithAdjacentEdges
in interfaceMultiEdges
- Returns:
- a stream containing the ids of nodes with incident edges
-
getNodesWithMutualEdges
default java.util.stream.IntStream getNodesWithMutualEdges()Description copied from interface:MultiEdges
Obtains the set of nodes which have, at least, a reciprocal edge.- Specified by:
getNodesWithMutualEdges
in interfaceMultiEdges
- Returns:
- a stream containing the ids of nodes with reciprocal edges.
-