Class AbstractNetwork<N,E>
java.lang.Object
com.google.common.graph.AbstractNetwork<N,E>
- Type Parameters:
N- Node parameter typeE- Edge parameter type
- All Implemented Interfaces:
Network<N,E>
- Direct Known Subclasses:
ImmutableNetwork
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadjacentEdges(Object edge) Returns the edges which have anincident nodein common withedge.asGraph()Returns a live view of this network as aGraph.intReturns the count ofnode'sincident edges, counting self-loops twice (equivalently, the number of times an edge touchesnode).intReturns the count ofnode'sincoming edgesin a directed network.intReturns the count ofnode'soutgoing edgesin a directed network.toString()Returns a string representation of this network.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Network
adjacentNodes, allowsParallelEdges, allowsSelfLoops, edgeOrder, edges, edgesConnecting, equals, hashCode, incidentEdges, incidentNodes, inEdges, isDirected, nodeOrder, nodes, outEdges, predecessors, successors
-
Constructor Details
-
AbstractNetwork
public AbstractNetwork()
-
-
Method Details
-
asGraph
Description copied from interface:NetworkReturns a live view of this network as aGraph. The resultingGraphwill have an edge connecting node A to node B if thisNetworkhas an edge connecting A to B.If this network
allows parallel edges, parallel edges will be treated as if collapsed into a single edge. For example, theNetwork.degree(Object)of a node in theGraphview may be less than the degree of the same node in thisNetwork. -
degree
Description copied from interface:NetworkReturns the count ofnode'sincident edges, counting self-loops twice (equivalently, the number of times an edge touchesnode).For directed networks, this is equal to
inDegree(node) + outDegree(node).For undirected networks, this is equal to
incidentEdges(node).size()+ (number of self-loops incident tonode).If the count is greater than
Integer.MAX_VALUE, returnsInteger.MAX_VALUE. -
inDegree
Description copied from interface:NetworkReturns the count ofnode'sincoming edgesin a directed network. In an undirected network, returns theNetwork.degree(Object).If the count is greater than
Integer.MAX_VALUE, returnsInteger.MAX_VALUE. -
outDegree
Description copied from interface:NetworkReturns the count ofnode'soutgoing edgesin a directed network. In an undirected network, returns theNetwork.degree(Object).If the count is greater than
Integer.MAX_VALUE, returnsInteger.MAX_VALUE. -
adjacentEdges
Description copied from interface:NetworkReturns the edges which have anincident nodein common withedge. An edge is not considered adjacent to itself.- Specified by:
adjacentEdgesin interfaceNetwork<N,E>
-
toString
-