Package es.uam.eps.ir.relison.graph
Interface WeightedGraph<V>
- Type Parameters:
V
- Type of vertices.
- All Superinterfaces:
Graph<V>
,java.io.Serializable
- All Known Subinterfaces:
DirectedWeightedGraph<V>
,DirectedWeightedMultiGraph<U>
,UndirectedWeightedGraph<V>
,UndirectedWeightedMultiGraph<V>
,WeightedMultiGraph<V>
,WeightedTree<U>
- All Known Implementing Classes:
DirectedWeightedComplementaryGraph
,FastDirectedWeightedGraph
,FastDirectedWeightedMultiGraph
,FastUndirectedWeightedGraph
,FastUndirectedWeightedMultiGraph
,FastWeightedTree
,UndirectedWeightedComplementaryGraph
public interface WeightedGraph<V> extends Graph<V>
Interface for directed 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>>
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.default boolean
isWeighted()
Indicates if the graph is weighted.Methods inherited from interface es.uam.eps.ir.relison.graph.Graph
addEdge, addEdge, addEdge, addEdge, addEdge, addEdge, addNode, complement, containsEdge, containsVertex, degree, degree, getAdjacencyMatrix, getAdjacencyMatrixMap, getAdjacentEdgesCount, getAdjacentMutualNodesTypes, getAdjacentMutualNodesWeights, getAdjacentNodes, getAdjacentNodesCount, getAdjacentNodesTypes, getAllNodes, getEdgeCount, getEdgeType, getEdgeWeight, getIncidentEdgesCount, getIncidentMutualNodesTypes, getIncidentMutualNodesWeights, getIncidentNodes, getIncidentNodesCount, getIncidentNodesTypes, getIsolatedNodes, getMutualEdgesCount, getMutualNodes, getMutualNodesCount, getMutualNodesTypes, getMutualNodesWeights, getNeighbourEdgesCount, getNeighbourhood, getNeighbourhoodSize, getNeighbourhoodTypes, getNeighbourhoodWeights, getNeighbourNodes, getNeighbourNodesCount, getNeighbourNodesTypes, getNodesWithAdjacentNeighbors, getNodesWithIncidentNeighbors, getNodesWithMutualNeighbors, getNodesWithNeighbors, getNodesWithNeighbors, getVertexCount, hasAdjacentNeighbors, hasIncidentNeighbors, hasMutualNeighbors, hasNeighbors, hasNeighbors, inDegree, isDirected, isMultigraph, isMutual, mutualDegree, outDegree, removeEdge, removeNode, updateEdgeType, updateEdgeWeight
-
Method Details
-
getIncidentNodesWeights
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>
- Parameters:
node
- The node.- Returns:
- A stream of the incident nodes.
-
getAdjacentNodesWeights
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>
- Parameters:
node
- The node.- Returns:
- A stream containing the adjacent nodes.
-
getNeighbourNodesWeights
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>
- Parameters:
node
- The node.- Returns:
- A stream containing all the nodes in the neighbourhood.
-
isWeighted
default boolean isWeighted()Description copied from interface:Graph
Indicates if the graph is weighted.- Specified by:
isWeighted
in interfaceGraph<V>
- Returns:
- true if it is, false if not.
-