it.unimi.dsi.webgraph.labelling
Class ArcLabelledImmutableSequentialGraph

java.lang.Object
  extended by it.unimi.dsi.webgraph.ImmutableGraph
      extended by it.unimi.dsi.webgraph.labelling.ArcLabelledImmutableGraph
          extended by it.unimi.dsi.webgraph.labelling.ArcLabelledImmutableSequentialGraph
All Implemented Interfaces:
FlyweightPrototype<ImmutableGraph>
Direct Known Subclasses:
IntegerTriplesArcLabelledImmutableGraph

public abstract class ArcLabelledImmutableSequentialGraph
extends ArcLabelledImmutableGraph

An abstract arc-labelled immutable graph that throws an UnsupportedOperationException on all random-access methods.

The main purpose of this class is to be used as a base for the numerous anonymous classes that do not support random access.


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.labelling.ArcLabelledImmutableGraph
UNDERLYINGGRAPH_PROPERTY_KEY, UNDERLYINGGRAPH_SUFFIX
 
Fields inherited from class it.unimi.dsi.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, PROPERTIES_EXTENSION
 
Constructor Summary
ArcLabelledImmutableSequentialGraph()
           
 
Method Summary
 ArcLabelledImmutableGraph copy()
          Throws an UnsupportedOperationException.
 Label[] labelArray(int x)
          Throws an UnsupportedOperationException.
 ArcLabelledNodeIterator nodeIterator(int x)
          Throws an UnsupportedOperationException.
 int outdegree(int x)
          Throws an UnsupportedOperationException.
 boolean randomAccess()
          Returns false.
 int[] successorArray(int x)
          Throws an UnsupportedOperationException.
 ArcLabelledNodeIterator.LabelledArcIterator successors(int x)
          Throws an UnsupportedOperationException.
 
Methods inherited from class it.unimi.dsi.webgraph.labelling.ArcLabelledImmutableGraph
equals, load, load, loadOffline, loadOffline, loadOnce, loadSequential, loadSequential, nodeIterator, prototype, toString
 
Methods inherited from class it.unimi.dsi.webgraph.ImmutableGraph
basename, hashCode, load, loadMapped, loadMapped, numArcs, numNodes, outdegrees, store, store
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArcLabelledImmutableSequentialGraph

public ArcLabelledImmutableSequentialGraph()
Method Detail

successorArray

public int[] successorArray(int x)
Throws an UnsupportedOperationException.

Overrides:
successorArray in class ImmutableGraph
Parameters:
x - a node.
Returns:
an array whose first elements are the successors of the node; the array must not be modified by the caller.

labelArray

public Label[] labelArray(int x)
Throws an UnsupportedOperationException.

Overrides:
labelArray in class ArcLabelledImmutableGraph
Returns:
an array whose first elements are the labels of the arcs going out of x; the array must not be modified by the caller.

outdegree

public int outdegree(int x)
Throws an UnsupportedOperationException.

Specified by:
outdegree in class ImmutableGraph
Parameters:
x - a node.
Returns:
the outdegree of the given node.

nodeIterator

public ArcLabelledNodeIterator nodeIterator(int x)
Throws an UnsupportedOperationException.

Overrides:
nodeIterator in class ArcLabelledImmutableGraph
Parameters:
x - the node from which the iterator will iterate.
Returns:
an ArcLabelledNodeIterator for accessing nodes, successors and their labels sequentially.
See Also:
ImmutableGraph.nodeIterator()

successors

public ArcLabelledNodeIterator.LabelledArcIterator successors(int x)
Throws an UnsupportedOperationException.

Specified by:
successors in class ArcLabelledImmutableGraph
Parameters:
x - a node.
Returns:
a lazy iterator over the successors of the node.

randomAccess

public boolean randomAccess()
Returns false.

Specified by:
randomAccess in class ImmutableGraph
Returns:
false.

copy

public ArcLabelledImmutableGraph copy()
Throws an UnsupportedOperationException.

Specified by:
copy in interface FlyweightPrototype<ImmutableGraph>
Specified by:
copy in class ArcLabelledImmutableGraph
Returns:
a flyweight copy of this immutable graph.
See Also:
FlyweightPrototype