it.unimi.dsi.webgraph
Class Transform.BatchGraph

java.lang.Object
  extended by it.unimi.dsi.webgraph.ImmutableGraph
      extended by it.unimi.dsi.webgraph.ImmutableSequentialGraph
          extended by it.unimi.dsi.webgraph.Transform.BatchGraph
All Implemented Interfaces:
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, PROPERTIES_EXTENSION
 
Constructor Summary
Transform.BatchGraph(int n, long m, ObjectArrayList<File> batches)
           
 
Method Summary
 Transform.BatchGraph copy()
          Throws an UnsupportedOperationException.
protected  void finalize()
           
 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, store, store, successors, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transform.BatchGraph

public Transform.BatchGraph(int n,
                            long m,
                            ObjectArrayList<File> batches)
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 a node iterator. This apparently bizarre behaviour is necessary to support implementations as ArcListASCIIGraph, which do not know the actual number of nodes until a traversal has been completed.

Specified by:
numNodes in class ImmutableGraph
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 class ImmutableGraph
Returns:
the number of arcs.

copy

public Transform.BatchGraph copy()
Description copied from class: ImmutableSequentialGraph
Throws an UnsupportedOperationException.

Specified by:
copy in interface FlyweightPrototype<ImmutableGraph>
Overrides:
copy in class ImmutableSequentialGraph
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 class ImmutableGraph
Returns:
a NodeIterator for accessing nodes and successors sequentially.

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable