Package it.unimi.dsi.big.webgraph
Class ImmutableSequentialGraph
java.lang.Object
it.unimi.dsi.big.webgraph.ImmutableGraph
it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
- All Implemented Interfaces:
FlyweightPrototype<ImmutableGraph>
- Direct Known Subclasses:
ArcListASCIIGraph,ASCIIGraph,IncrementalImmutableSequentialGraph,IntegerListImmutableGraph,ScatteredArcsASCIIGraph,Transform.BatchGraph
public abstract class ImmutableSequentialGraph extends ImmutableGraph
An abstract 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.big.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod -
Field Summary
Fields inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, PROPERTIES_EXTENSION -
Constructor Summary
Constructors Constructor Description ImmutableSequentialGraph() -
Method Summary
Modifier and Type Method Description ImmutableGraphcopy()Throws anUnsupportedOperationException.longoutdegree(long x)Throws anUnsupportedOperationException.booleanrandomAccess()Returns false.long[][]successorBigArray(long x)Throws anUnsupportedOperationException.Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
basename, equals, hashCode, intNumNodes, load, load, load, loadMapped, loadMapped, loadOffline, loadOffline, loadOnce, loadSequential, loadSequential, nodeIterator, nodeIterator, numArcs, numNodes, outdegrees, store, store, successors, toString, wrap, wrap
-
Constructor Details
-
ImmutableSequentialGraph
public ImmutableSequentialGraph()
-
-
Method Details
-
successorBigArray
public long[][] successorBigArray(long x)Throws anUnsupportedOperationException.- Overrides:
successorBigArrayin classImmutableGraph- 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.
-
outdegree
public long outdegree(long x)Throws anUnsupportedOperationException.- Specified by:
outdegreein classImmutableGraph- Parameters:
x- a node.- Returns:
- the outdegree of the given node.
-
randomAccess
public boolean randomAccess()Returns false.- Specified by:
randomAccessin classImmutableGraph- Returns:
- false.
-
copy
Throws anUnsupportedOperationException.- Specified by:
copyin interfaceFlyweightPrototype<ImmutableGraph>- Specified by:
copyin classImmutableGraph- Returns:
- a flyweight copy of this immutable graph.
- See Also:
FlyweightPrototype
-