Package it.unimi.dsi.webgraph
Class Transform.BatchGraph
- java.lang.Object
-
- it.unimi.dsi.webgraph.ImmutableGraph
-
- it.unimi.dsi.webgraph.ImmutableSequentialGraph
-
- it.unimi.dsi.webgraph.Transform.BatchGraph
-
- All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
- Enclosing class:
- Transform
public static final class Transform.BatchGraph extends ImmutableSequentialGraph
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unimi.dsi.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod
-
-
Field Summary
-
Fields inherited from class it.unimi.dsi.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description BatchGraph(int n, long m, it.unimi.dsi.fastutil.objects.ObjectArrayList<java.io.File> batches)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transform.BatchGraph
copy()
Throws anUnsupportedOperationException
.protected void
finalize()
boolean
hasCopiableIterators()
Whether the node iterators returned by this graph supportNodeIterator.copy(int)
.NodeIterator
nodeIterator()
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).int
numNodes()
Returns the number of nodes of this graph.-
Methods inherited from class it.unimi.dsi.webgraph.ImmutableSequentialGraph
nodeIterator, outdegree, randomAccess, successorArray
-
Methods inherited from class it.unimi.dsi.webgraph.ImmutableGraph
basename, equals, hashCode, load, load, load, loadMapped, loadMapped, loadOffline, loadOffline, loadOnce, loadSequential, loadSequential, outdegrees, splitNodeIterators, store, store, successors, toString
-
-
-
-
Method Detail
-
numNodes
public int 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(int)
.- Overrides:
hasCopiableIterators
in classImmutableGraph
- Returns:
- true if this graph provides copiable iterators.
-
copy
public Transform.BatchGraph copy()
Description copied from class:ImmutableSequentialGraph
Throws anUnsupportedOperationException
.- Specified by:
copy
in interfaceit.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
- Overrides:
copy
in classImmutableSequentialGraph
- Returns:
- a flyweight copy of this immutable graph.
- See Also:
FlyweightPrototype
-
nodeIterator
public NodeIterator 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
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-