it.unimi.dsi.webgraph
Class SemiExternalOffsetList

java.lang.Object
  extended by java.util.AbstractCollection<Long>
      extended by it.unimi.dsi.fastutil.longs.AbstractLongCollection
          extended by it.unimi.dsi.fastutil.longs.AbstractLongBigList
              extended by it.unimi.dsi.webgraph.SemiExternalOffsetList
All Implemented Interfaces:
BigList<Long>, LongBigList, LongCollection, LongIterable, LongStack, Size64, Stack<Long>, Comparable<BigList<? extends Long>>, Iterable<Long>, Collection<Long>

public class SemiExternalOffsetList
extends AbstractLongBigList

Provides semi-external random access to offsets of a BVGraph.

This class is a semi-external LongList that is used to access graph streams when an EliasFanoMonotoneLongBigList is not available.

This class accesses offsets in their compressed forms, and provides entry points for random access to each offset. At construction time, entry points are computed with a certain step, which is the number of offsets accessible from each entry point, or, equivalently, the maximum number of offsets that will be necessary to read to access a given offset.

Warning: This class is not thread safe, and needs to be synchronised to be used in a multithreaded environment.

Author:
Fabien Campagne, Sebastiano Vigna

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
AbstractLongBigList.LongSubList
 
Constructor Summary
SemiExternalOffsetList(InputBitStream offsetRawData, int offsetStep, long numOffsets)
          Creates a new semi-external list.
 
Method Summary
 long getLong(long index)
           
 long length()
          Deprecated. 
 long size64()
           
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, get, getElements, getLong, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, listIterator, peek, peekLong, pop, popLong, push, push, rem, remove, remove, removeElements, removeLong, removeLong, set, set, set, size, size, size, subList, top, topLong, toString
 
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, contains, containsAll, containsAll, isEmpty, longIterator, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from class java.util.AbstractCollection
clear
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
containsAll, longIterator, removeAll, retainAll, toArray, toArray, toLongArray, toLongArray
 
Methods inherited from interface java.util.Collection
add, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Constructor Detail

SemiExternalOffsetList

public SemiExternalOffsetList(InputBitStream offsetRawData,
                              int offsetStep,
                              long numOffsets)
                       throws IOException
Creates a new semi-external list.

Parameters:
offsetRawData - a bit stream containing the offsets in compressed form (γ-encoded deltas).
offsetStep - the step used to build random-access entry points.
numOffsets - the overall number of offsets (i.e., the number of terms).
Throws:
IOException
Method Detail

getLong

public final long getLong(long index)

length

@Deprecated
public long length()
Deprecated. 


size64

public long size64()