Package it.unimi.dsi.big.webgraph
Class Transform.BatchGraph
java.lang.Object
it.unimi.dsi.big.webgraph.ImmutableGraph
it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
it.unimi.dsi.big.webgraph.Transform.BatchGraph
- All Implemented Interfaces:
FlyweightPrototype<ImmutableGraph>
- Enclosing class:
- Transform
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod
-
Field Summary
Fields inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Throws anUnsupportedOperationException
.protected void
finalize()
boolean
Whether the node iterators returned by this graph supportNodeIterator.copy(long)
.Returns a node iterator for scanning the graph sequentially, starting from the first node.long
numArcs()
Returns the number of arcs of this graph (optional operation).long
numNodes()
Returns the number of nodes of this graph.Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
nodeIterator, outdegree, randomAccess, successorBigArray
Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
basename, equals, hashCode, intNumNodes, load, load, load, loadMapped, loadMapped, loadOffline, loadOffline, loadOnce, loadSequential, loadSequential, outdegrees, splitNodeIterators, store, store, successors, toString, wrap, wrap
-
Constructor Details
-
BatchGraph
-
-
Method Details
-
numNodes
public long numNodes()Description copied from class:ImmutableGraph
Returns the number of nodes of this graph.Albeit this method is not optional, it is allowed that this method throws an
UnsupportedOperationException
if this graph has never been entirely traversed using anode iterator
. This apparently bizarre behaviour is necessary to support implementations asArcListASCIIGraph
, which do not know the actual number of nodes until a traversal has been completed.- Specified by:
numNodes
in classImmutableGraph
- Returns:
- the number of nodes.
-
numArcs
public long numArcs()Description copied from class:ImmutableGraph
Returns the number of arcs of this graph (optional operation).- Overrides:
numArcs
in classImmutableGraph
- Returns:
- the number of arcs.
-
hasCopiableIterators
public boolean hasCopiableIterators()Description copied from class:ImmutableGraph
Whether the node iterators returned by this graph supportNodeIterator.copy(long)
.- Overrides:
hasCopiableIterators
in classImmutableGraph
- Returns:
- true if this graph provides copiable iterators.
-
copy
Description copied from class:ImmutableSequentialGraph
Throws anUnsupportedOperationException
.- Specified by:
copy
in interfaceFlyweightPrototype<ImmutableGraph>
- Overrides:
copy
in classImmutableSequentialGraph
- Returns:
- a flyweight copy of this immutable graph.
- See Also:
-
nodeIterator
Description copied from class:ImmutableGraph
Returns a node iterator for scanning the graph sequentially, starting from the first node.- Overrides:
nodeIterator
in classImmutableGraph
- Returns:
- a
NodeIterator
for accessing nodes and successors sequentially.
-
finalize
-