Module org.jgrapht.unimi.dsi
Package org.jgrapht.sux4j
Class SuccinctIntUndirectedGraph.SuccinctGraphIterables
- java.lang.Object
-
- org.jgrapht.sux4j.SuccinctIntUndirectedGraph.SuccinctGraphIterables
-
- All Implemented Interfaces:
java.io.Serializable
,GraphIterables<java.lang.Integer,java.lang.Integer>
- Enclosing class:
- SuccinctIntUndirectedGraph
private static final class SuccinctIntUndirectedGraph.SuccinctGraphIterables extends java.lang.Object implements GraphIterables<java.lang.Integer,java.lang.Integer>, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private SuccinctIntUndirectedGraph
graph
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
SuccinctGraphIterables()
private
SuccinctGraphIterables(SuccinctIntUndirectedGraph graph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
edgeCount()
Return the number of edges in the graph.java.lang.Iterable<java.lang.Integer>
edgesOf(java.lang.Integer source)
Returns an iterable view over all edges touching the specified vertex.Graph<java.lang.Integer,java.lang.Integer>
getGraph()
Get the underlying graph.java.lang.Iterable<java.lang.Integer>
incomingEdgesOf(java.lang.Integer vertex)
Returns an iterable view over all edges incoming into the specified vertex.java.lang.Iterable<java.lang.Integer>
outgoingEdgesOf(java.lang.Integer vertex)
Returns an iterable view over all edges outgoing into the specified vertex.private java.lang.Iterable<java.lang.Integer>
reverseSortedEdgesOfNoLoops(int target)
long
vertexCount()
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, edges, inDegreeOf, outDegreeOf, vertices
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
graph
private final SuccinctIntUndirectedGraph graph
-
-
Constructor Detail
-
SuccinctGraphIterables
private SuccinctGraphIterables()
-
SuccinctGraphIterables
private SuccinctGraphIterables(SuccinctIntUndirectedGraph graph)
-
-
Method Detail
-
getGraph
public Graph<java.lang.Integer,java.lang.Integer> getGraph()
Description copied from interface:GraphIterables
Get the underlying graph.- Specified by:
getGraph
in interfaceGraphIterables<java.lang.Integer,java.lang.Integer>
- 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<java.lang.Integer,java.lang.Integer>
- 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<java.lang.Integer,java.lang.Integer>
- Returns:
- the number of edges.
-
edgesOf
public java.lang.Iterable<java.lang.Integer> edgesOf(java.lang.Integer source)
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<java.lang.Integer,java.lang.Integer>
- Parameters:
source
- input vertex- Returns:
- an iterable view of the vertices contained in this graph
-
reverseSortedEdgesOfNoLoops
private java.lang.Iterable<java.lang.Integer> reverseSortedEdgesOfNoLoops(int target)
-
incomingEdgesOf
public java.lang.Iterable<java.lang.Integer> incomingEdgesOf(java.lang.Integer vertex)
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<java.lang.Integer,java.lang.Integer>
- Parameters:
vertex
- input vertex- Returns:
- an iterable view of all edges incoming into the specified vertex
-
outgoingEdgesOf
public java.lang.Iterable<java.lang.Integer> outgoingEdgesOf(java.lang.Integer vertex)
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<java.lang.Integer,java.lang.Integer>
- Parameters:
vertex
- input vertex- Returns:
- an iterable view of all edges outgoing from the specified vertex
-
-