N
- Node parameter typeV
- Value parameter type@Beta public abstract class AbstractValueGraph<N,V> extends AbstractGraph<N> implements ValueGraph<N,V>
ValueGraph
. It is recommended to extend
this class rather than implement ValueGraph
directly.Constructor and Description |
---|
AbstractValueGraph() |
Modifier and Type | Method and Description |
---|---|
V |
edgeValue(java.lang.Object nodeU,
java.lang.Object nodeV)
If there is an edge connecting
nodeU to nodeV , returns the non-null value
associated with that edge. |
private java.util.Map<EndpointPair<N>,V> |
edgeValueMap() |
java.lang.String |
toString()
Returns a string representation of this graph.
|
degree, edgeCount, edges, inDegree, outDegree
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
edgeValueOrDefault, equals, hashCode
adjacentNodes, allowsSelfLoops, degree, edges, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successors
public V edgeValue(java.lang.Object nodeU, java.lang.Object nodeV)
ValueGraph
nodeU
to nodeV
, returns the non-null value
associated with that edge.
In an undirected graph, this is equal to edgeValue(nodeV, nodeU)
.
edgeValue
in interface ValueGraph<N,V>
public java.lang.String toString()
toString
in class AbstractGraph<N>
private java.util.Map<EndpointPair<N>,V> edgeValueMap()