- All Implemented Interfaces:
 it.unimi.dsi.lang.FlyweightPrototype<ImmutableDirectedBigGraphAdapter>,Graph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> 
ImmutableGraph.
 
 This class is equivalent to ImmutableDirectedGraphAdapter, except that nodes are
 instances of Long, and edges are instances of LongLongPair.
 
If necessary, you can adapt a standard WebGraph graph using the suitable wrapper.
- Author:
 - Sebastiano Vigna
 - See Also:
 
- 
Field Summary
Fields inherited from class org.jgrapht.webgraph.AbstractImmutableBigGraphAdapter
immutableGraph, m, nFields inherited from interface org.jgrapht.Graph
DEFAULT_EDGE_WEIGHT - 
Constructor Summary
ConstructorsConstructorDescriptionImmutableDirectedBigGraphAdapter(it.unimi.dsi.big.webgraph.ImmutableGraph immutableGraph) Creates an adapter for a directed big immutable graph implementing only methods based on outgoing edges.ImmutableDirectedBigGraphAdapter(it.unimi.dsi.big.webgraph.ImmutableGraph immutableGraph, it.unimi.dsi.big.webgraph.ImmutableGraph immutableTranspose) Creates an adapter for a directed big immutable graph. - 
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsEdge(it.unimi.dsi.fastutil.longs.LongLongPair e) Returnstrueif this graph contains the specified edge.copy()intReturns the degree of the specified vertex.Set<it.unimi.dsi.fastutil.longs.LongLongPair>edgeSet()Returns a set of the edges contained in this graph.Set<it.unimi.dsi.fastutil.longs.LongLongPair>Returns a set of all edges touching the specified vertex.getType()Get the graph type.Set<it.unimi.dsi.fastutil.longs.LongLongPair>incomingEdgesOf(Long vertex) Returns a set of all edges incoming into the specified vertex.intinDegreeOf(Long vertex) Returns the "in degree" of the specified vertex.GraphIterables<Long,it.unimi.dsi.fastutil.longs.LongLongPair> Access the graph using theGraphIterablesinterface.protected it.unimi.dsi.fastutil.longs.LongLongPairmakeEdge(long x, long y) intoutDegreeOf(Long vertex) Returns the "out degree" of the specified vertex.Set<it.unimi.dsi.fastutil.longs.LongLongPair>outgoingEdgesOf(Long vertex) Returns a set of all edges outgoing from the specified vertex.Methods inherited from class org.jgrapht.webgraph.AbstractImmutableBigGraphAdapter
addEdge, addEdge, addVertex, addVertex, containsEdge, containsEdgeFast, containsVertex, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getVertexSupplier, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSetMethods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgrapht.Graph
setEdgeWeight 
- 
Constructor Details
- 
ImmutableDirectedBigGraphAdapter
public ImmutableDirectedBigGraphAdapter(it.unimi.dsi.big.webgraph.ImmutableGraph immutableGraph, it.unimi.dsi.big.webgraph.ImmutableGraph immutableTranspose) Creates an adapter for a directed big immutable graph.It is responsibility of the caller that the two provided graphs are one the transpose of the other (for each arc x → y in a graph there must be an arc y → x in the other). If this property is not true, results will be unpredictable.
- Parameters:
 immutableGraph- a big immutable graph.immutableTranspose- its transpose.
 - 
ImmutableDirectedBigGraphAdapter
public ImmutableDirectedBigGraphAdapter(it.unimi.dsi.big.webgraph.ImmutableGraph immutableGraph) Creates an adapter for a directed big immutable graph implementing only methods based on outgoing edges.- Parameters:
 immutableGraph- a big immutable graph.
 
 - 
 - 
Method Details
- 
makeEdge
protected it.unimi.dsi.fastutil.longs.LongLongPair makeEdge(long x, long y) - Specified by:
 makeEdgein classAbstractImmutableBigGraphAdapter<it.unimi.dsi.fastutil.longs.LongLongPair>
 - 
containsEdge
public boolean containsEdge(it.unimi.dsi.fastutil.longs.LongLongPair e) Description copied from interface:GraphReturnstrueif this graph contains the specified edge. More formally, returnstrueif and only if this graph contains an edgee2such thate.equals(e2). If the specified edge isnullreturnsfalse.- Specified by:
 containsEdgein interfaceGraph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> - Parameters:
 e- edge whose presence in this graph is to be tested.- Returns:
 trueif this graph contains the specified edge.
 - 
edgeSet
Description copied from interface:GraphReturns a set of the edges contained in this graph. The set is backed by the graph, so changes to the graph are reflected in the set. If the graph is modified while an iteration over the set is in progress, the results of the iteration are undefined.The graph implementation may maintain a particular set ordering (e.g. via
LinkedHashSet) for deterministic iteration, but this is not required. It is the responsibility of callers who rely on this behavior to only use graph implementations which support it. - 
degreeOf
Description copied from interface:GraphReturns the degree of the specified vertex.A degree of a vertex in an undirected graph is the number of edges touching that vertex. Edges with same source and target vertices (self-loops) are counted twice.
In directed graphs this method returns the sum of the "in degree" and the "out degree".
 - 
edgesOf
Description copied from interface:GraphReturns a set of all edges touching the specified vertex. If no edges are touching the specified vertex returns an empty set. - 
inDegreeOf
Description copied from interface:GraphReturns the "in degree" of the specified vertex.The "in degree" of a vertex in a directed graph is the number of inward directed edges from that vertex. See http://mathworld.wolfram.com/Indegree.html.
In the case of undirected graphs this method returns the number of edges touching the vertex. Edges with same source and target vertices (self-loops) are counted twice.
- Specified by:
 inDegreeOfin interfaceGraph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> - Parameters:
 vertex- vertex whose degree is to be calculated.- Returns:
 - the degree of the specified vertex.
 
 - 
incomingEdgesOf
Description copied from interface:GraphReturns a set of all edges incoming into the specified vertex.In the case of undirected graphs this method returns all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
- Specified by:
 incomingEdgesOfin interfaceGraph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> - Parameters:
 vertex- the vertex for which the list of incoming edges to be returned.- Returns:
 - a set of all edges incoming into the specified vertex.
 
 - 
outDegreeOf
Description copied from interface:GraphReturns the "out degree" of the specified vertex.The "out degree" of a vertex in a directed graph is the number of outward directed edges from that vertex. See http://mathworld.wolfram.com/Outdegree.html.
In the case of undirected graphs this method returns the number of edges touching the vertex. Edges with same source and target vertices (self-loops) are counted twice.
- Specified by:
 outDegreeOfin interfaceGraph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> - Parameters:
 vertex- vertex whose degree is to be calculated.- Returns:
 - the degree of the specified vertex.
 
 - 
outgoingEdgesOf
Description copied from interface:GraphReturns a set of all edges outgoing from the specified vertex.In the case of undirected graphs this method returns all edges touching the vertex, thus, some of the returned edges may have their source and target vertices in the opposite order.
- Specified by:
 outgoingEdgesOfin interfaceGraph<Long,it.unimi.dsi.fastutil.longs.LongLongPair> - Parameters:
 vertex- the vertex for which the list of outgoing edges to be returned.- Returns:
 - a set of all edges outgoing from the specified vertex.
 
 - 
getType
Description copied from interface:GraphGet the graph type. The graph type can be used to query for additional metadata such as whether the graph supports directed or undirected edges, self-loops, multiple (parallel) edges, weights, etc. - 
copy
- Specified by:
 copyin interfaceit.unimi.dsi.lang.FlyweightPrototype<ImmutableDirectedBigGraphAdapter>
 - 
iterables
Description copied from interface:GraphAccess the graph using theGraphIterablesinterface. This allows accessing graphs without the restrictions imposed by 32-bit arithmetic. Moreover, graph implementations are free to implement this interface without explicitly materializing intermediate results. 
 -