Package it.unimi.dsi.big.webgraph
Class IncrementalImmutableSequentialGraph
- java.lang.Object
-
- it.unimi.dsi.big.webgraph.ImmutableGraph
-
- it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
-
- it.unimi.dsi.big.webgraph.IncrementalImmutableSequentialGraph
-
- All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
public class IncrementalImmutableSequentialGraph extends ImmutableSequentialGraph
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod
-
-
Field Summary
Fields Modifier and Type Field Description static long[][]END_OF_GRAPHA marker for the end of the graph.-
Fields inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION
-
-
Constructor Summary
Constructors Constructor Description IncrementalImmutableSequentialGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long[] successor)Adds a new node having as successors contained in the specified array.voidadd(long[][] successor)Adds a new node having as successors contained in the specified big array.voidadd(long[][] successor, long offset, long length)Adds a new node having as successors contained in the specified big array fragment.voidadd(long[] successor, int offset, int length)Adds a new node having as successors contained in the specified array fragment.NodeIteratornodeIterator()Returns a node iterator for scanning the graph sequentially, starting from the first node.longnumNodes()Returns the number of nodes of this graph.-
Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
copy, nodeIterator, outdegree, randomAccess, successorBigArray
-
Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
basename, equals, hasCopiableIterators, hashCode, intNumNodes, load, load, load, loadMapped, loadMapped, loadOffline, loadOffline, loadOnce, loadSequential, loadSequential, numArcs, outdegrees, splitNodeIterators, store, store, successors, toString, wrap, wrap
-
-
-
-
Method Detail
-
numNodes
public long numNodes()
Description copied from class:ImmutableGraphReturns the number of nodes of this graph.Albeit this method is not optional, it is allowed that this method throws an
UnsupportedOperationExceptionif 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:
numNodesin classImmutableGraph- Returns:
- the number of nodes.
-
nodeIterator
public NodeIterator nodeIterator()
Description copied from class:ImmutableGraphReturns a node iterator for scanning the graph sequentially, starting from the first node.- Overrides:
nodeIteratorin classImmutableGraph- Returns:
- a
NodeIteratorfor accessing nodes and successors sequentially.
-
add
public void add(long[][] successor, long offset, long length) throws java.lang.InterruptedExceptionAdds a new node having as successors contained in the specified big array fragment.The fragment must be sorted in increasing order.
- Parameters:
successor- a big array.offset- the first valid entry insuccessor.length- the number of valid entries.- Throws:
java.lang.InterruptedException
-
add
public void add(long[][] successor) throws java.lang.InterruptedExceptionAdds a new node having as successors contained in the specified big array.The array must be sorted in increasing order.
- Parameters:
successor- a big array.- Throws:
java.lang.InterruptedException
-
add
public void add(long[] successor, int offset, int length) throws java.lang.InterruptedExceptionAdds a new node having as successors contained in the specified array fragment.The fragment must be sorted in increasing order.
- Parameters:
successor- an array.offset- the first valid entry insuccessor.length- the number of valid entries.- Throws:
java.lang.InterruptedException
-
add
public void add(long[] successor) throws java.lang.InterruptedExceptionAdds a new node having as successors contained in the specified array.The array must be sorted in increasing order.
- Parameters:
successor- an array.- Throws:
java.lang.InterruptedException
-
-