Module org.jgrapht.unimi.dsi
Package org.jgrapht.sux4j
Class SuccinctDirectedGraph.SuccinctGraphIterables
java.lang.Object
org.jgrapht.sux4j.SuccinctDirectedGraph.SuccinctGraphIterables
- All Implemented Interfaces:
Serializable
,GraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair>
- Enclosing class:
SuccinctDirectedGraph
private static final class SuccinctDirectedGraph.SuccinctGraphIterables
extends Object
implements GraphIterables<Integer,it.unimi.dsi.fastutil.ints.IntIntPair>, Serializable
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
-
Method Summary
Modifier and TypeMethodDescriptionlong
Return the number of edges in the graph.Iterable
<it.unimi.dsi.fastutil.ints.IntIntPair> edges()
Returns an iterable over the edges of the graph.Iterable
<it.unimi.dsi.fastutil.ints.IntIntPair> Returns an iterable view over all edges touching the specified vertex.getGraph()
Get the underlying graph.private Iterable
<it.unimi.dsi.fastutil.ints.IntIntPair> incomingEdgesOf
(int target, boolean skipLoops) Iterable
<it.unimi.dsi.fastutil.ints.IntIntPair> incomingEdgesOf
(Integer vertex) Returns an iterable view over all edges incoming into the specified vertex.Iterable
<it.unimi.dsi.fastutil.ints.IntIntPair> outgoingEdgesOf
(Integer vertex) Returns an iterable view over all edges outgoing into the specified vertex.long
Return the number of vertices in the graph.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.GraphIterables
allEdges, degreeOf, inDegreeOf, outDegreeOf, vertices
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
graph
-
-
Constructor Details
-
SuccinctGraphIterables
private SuccinctGraphIterables() -
SuccinctGraphIterables
-
-
Method Details
-
getGraph
Description copied from interface:GraphIterables
Get the underlying graph.- Specified by:
getGraph
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Returns:
- the underlying graph
-
vertexCount
public long vertexCount()Description copied from interface:GraphIterables
Return the number of vertices in the graph.- Specified by:
vertexCount
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Returns:
- the number of vertices
-
edgeCount
public long edgeCount()Description copied from interface:GraphIterables
Return the number of edges in the graph.- Specified by:
edgeCount
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Returns:
- the number of edges.
-
edges
Description copied from interface:GraphIterables
Returns an iterable over the edges of the graph.Whether the ordering is deterministic, depends on the actual graph implementation. It is the responsibility of callers who rely on this behavior to only use graph implementations which support it.
- Specified by:
edges
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Returns:
- an iterable over the edges of the graph.
-
edgesOf
Description copied from interface:GraphIterables
Returns an iterable view over all edges touching the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined. If no edges are touching the specified vertex, the returned iterators are already exhausted.- Specified by:
edgesOf
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Parameters:
source
- input vertex- Returns:
- an iterable view of the vertices contained in this graph
-
incomingEdgesOf
private Iterable<it.unimi.dsi.fastutil.ints.IntIntPair> incomingEdgesOf(int target, boolean skipLoops) -
outgoingEdgesOf
Description copied from interface:GraphIterables
Returns an iterable view over all edges outgoing into the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined.In the case of undirected graphs the returned iterators return all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
- Specified by:
outgoingEdgesOf
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Parameters:
vertex
- input vertex- Returns:
- an iterable view of all edges outgoing from the specified vertex
-
incomingEdgesOf
Description copied from interface:GraphIterables
Returns an iterable view over all edges incoming into the specified vertex. The returned iterators are live views. If the graph is modified while an iteration is in progress, the results of the iteration are undefined.In the case of undirected graphs the returned iterators return all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
- Specified by:
incomingEdgesOf
in interfaceGraphIterables<Integer,
it.unimi.dsi.fastutil.ints.IntIntPair> - Parameters:
vertex
- input vertex- Returns:
- an iterable view of all edges incoming into the specified vertex
-