JavaScript is disabled on your browser.
Type Parameters:
N - Node parameter type
E - Edge parameter type
All Implemented Interfaces:
com.google.common.graph.MutableNetwork<N,E> , com.google.common.graph.Network<N,E> , com.google.common.graph.PredecessorsFunction<N>, com.google.common.graph.SuccessorsFunction<N>
public final class StableStandardMutableNetwork<N,E>
extends Object
implements com.google.common.graph.MutableNetwork<N,E>
This is mostly a copy of StandardMutableNetwork that delegates the construction of its underlying
connections to a class providing stable iteration order over them.
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
boolean
addEdge (com.google.common.graph.EndpointPair<N > endpoints,
E edge)
boolean
boolean
boolean
boolean
com.google.common.graph.Graph<N >
int
com.google.common.graph.ElementOrder<E >
boolean
boolean
com.google.common.graph.EndpointPair<N >
int
boolean
com.google.common.graph.ElementOrder<N >
int
boolean
boolean
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Methods inherited from interface com.google.common.graph.Network
equals, hashCode
Constructor Details
StableStandardMutableNetwork
public StableStandardMutableNetwork (@Nonnull
com.google.common.graph.NetworkBuilder<? super N ,? super E > builder)
Method Details
addNode
public boolean addNode (@Nonnull
N node)
Specified by:
addNode in interface com.google.common.graph.MutableNetwork<N ,E >
addEdge
public boolean addEdge (@Nonnull
N nodeU,
@Nonnull
N nodeV,
@Nonnull
E edge)
Specified by:
addEdge in interface com.google.common.graph.MutableNetwork<N ,E >
asGraph
@Nonnull
public com.google.common.graph.Graph<N > asGraph ()
Specified by:
asGraph in interface com.google.common.graph.Network<N ,E >
degree
public int degree (@Nonnull
N node)
Specified by:
degree in interface com.google.common.graph.Network<N ,E >
inDegree
public int inDegree (@Nonnull
N node)
Specified by:
inDegree in interface com.google.common.graph.Network<N ,E >
outDegree
public int outDegree (@Nonnull
N node)
Specified by:
outDegree in interface com.google.common.graph.Network<N ,E >
adjacentEdges
@Nonnull
public Set <E > adjacentEdges (@Nonnull
E edge)
Specified by:
adjacentEdges in interface com.google.common.graph.Network<N ,E >
edgesConnecting
@Nonnull
public Set <E > edgesConnecting (@Nonnull
com.google.common.graph.EndpointPair<N > endpoints)
Specified by:
edgesConnecting in interface com.google.common.graph.Network<N ,E >
edgeConnecting
@Nonnull
public Optional <E > edgeConnecting (@Nonnull
N nodeU,
@Nonnull
N nodeV)
Specified by:
edgeConnecting in interface com.google.common.graph.Network<N ,E >
edgeConnecting
@Nonnull
public Optional <E > edgeConnecting (@Nonnull
com.google.common.graph.EndpointPair<N > endpoints)
Specified by:
edgeConnecting in interface com.google.common.graph.Network<N ,E >
edgeConnectingOrNull
@Nullable
public E edgeConnectingOrNull (@Nonnull
N nodeU,
@Nonnull
N nodeV)
Specified by:
edgeConnectingOrNull in interface com.google.common.graph.Network<N ,E >
edgeConnectingOrNull
@Nullable
public E edgeConnectingOrNull (@Nonnull
com.google.common.graph.EndpointPair<N > endpoints)
Specified by:
edgeConnectingOrNull in interface com.google.common.graph.Network<N ,E >
hasEdgeConnecting
public boolean hasEdgeConnecting (@Nonnull
N nodeU,
@Nonnull
N nodeV)
Specified by:
hasEdgeConnecting in interface com.google.common.graph.Network<N ,E >
hasEdgeConnecting
public boolean hasEdgeConnecting (@Nonnull
com.google.common.graph.EndpointPair<N > endpoints)
Specified by:
hasEdgeConnecting in interface com.google.common.graph.Network<N ,E >
nodes
@Nonnull
public Set <N > nodes ()
Specified by:
nodes in interface com.google.common.graph.Network<N ,E >
edges
@Nonnull
public Set <E > edges ()
Specified by:
edges in interface com.google.common.graph.Network<N ,E >
isDirected
public boolean isDirected ()
Specified by:
isDirected in interface com.google.common.graph.Network<N ,E >
allowsParallelEdges
public boolean allowsParallelEdges ()
Specified by:
allowsParallelEdges in interface com.google.common.graph.Network<N ,E >
allowsSelfLoops
public boolean allowsSelfLoops ()
Specified by:
allowsSelfLoops in interface com.google.common.graph.Network<N ,E >
nodeOrder
@Nonnull
public com.google.common.graph.ElementOrder<N > nodeOrder ()
Specified by:
nodeOrder in interface com.google.common.graph.Network<N ,E >
edgeOrder
@Nonnull
public com.google.common.graph.ElementOrder<E > edgeOrder ()
Specified by:
edgeOrder in interface com.google.common.graph.Network<N ,E >
incidentEdges
@Nonnull
public Set <E > incidentEdges (@Nonnull
N node)
Specified by:
incidentEdges in interface com.google.common.graph.Network<N ,E >
incidentNodes
@Nonnull
public com.google.common.graph.EndpointPair<N > incidentNodes (@Nonnull
E edge)
Specified by:
incidentNodes in interface com.google.common.graph.Network<N ,E >
adjacentNodes
@Nonnull
public Set <N > adjacentNodes (@Nonnull
N node)
Specified by:
adjacentNodes in interface com.google.common.graph.Network<N ,E >
edgesConnecting
@Nonnull
public Set <E > edgesConnecting (@Nonnull
N nodeU,
@Nonnull
N nodeV)
Specified by:
edgesConnecting in interface com.google.common.graph.Network<N ,E >
inEdges
@Nonnull
public Set <E > inEdges (@Nonnull
N node)
Specified by:
inEdges in interface com.google.common.graph.Network<N ,E >
outEdges
@Nonnull
public Set <E > outEdges (@Nonnull
N node)
Specified by:
outEdges in interface com.google.common.graph.Network<N ,E >
predecessors
@Nonnull
public Set <N > predecessors (@Nonnull
N node)
Specified by:
predecessors in interface com.google.common.graph.Network<N ,E >
Specified by:
predecessors in interface com.google.common.graph.PredecessorsFunction<N >
successors
@Nonnull
public Set <N > successors (@Nonnull
N node)
Specified by:
successors in interface com.google.common.graph.Network<N ,E >
Specified by:
successors in interface com.google.common.graph.SuccessorsFunction<N >
addEdge
public boolean addEdge (@Nonnull
com.google.common.graph.EndpointPair<N > endpoints,
E edge)
Specified by:
addEdge in interface com.google.common.graph.MutableNetwork<N ,E >
removeNode
public boolean removeNode (@Nonnull
N node)
Specified by:
removeNode in interface com.google.common.graph.MutableNetwork<N ,E >
removeEdge
public boolean removeEdge (@Nonnull
E edge)
Specified by:
removeEdge in interface com.google.common.graph.MutableNetwork<N ,E >