Class EliasFanoPrefixSumLongBigList
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Long>, it.unimi.dsi.fastutil.longs.LongBigList, it.unimi.dsi.fastutil.longs.LongCollection, it.unimi.dsi.fastutil.longs.LongIterable, it.unimi.dsi.fastutil.longs.LongStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Long>, Serializable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Long>>, Iterable<Long>, Collection<Long>
Instances of this class store in compacted form a list of longs. Values are provided either through an iterable object. As an additional service, this list provides access to the prefix sums of its values.
Implementation details
Instances of this class are essentially a view over an instance of
EliasFanoMonotoneLongBigList storing the prefix sums. The getLong(long) method
delegates to EliasFanoMonotoneLongBigList.getDelta(long). The iterator has the same properties of the iterator
returned by EliasFanoMonotoneLongBiglist.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAn list iterator over the values of thisEliasFanoPrefixSumLongBigList.Nested classes/interfaces inherited from class EliasFanoMonotoneLongBigList
EliasFanoMonotoneLongBigList.EliasFanoMonotoneLongBigListIteratorNested classes/interfaces inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
it.unimi.dsi.fastutil.longs.AbstractLongBigList.LongRandomAccessSubList, it.unimi.dsi.fastutil.longs.AbstractLongBigList.LongSubList -
Field Summary
Fields inherited from class EliasFanoMonotoneLongBigList
l, length, lowerBits, lowerBitsMask, selectUpper -
Constructor Summary
ConstructorsConstructorDescriptionEliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.bytes.ByteIterable elements) Creates a new Elias–Fano prefix-sum long big list.EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.ints.IntIterable elements) Creates a new Elias–Fano prefix-sum long big list.EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.longs.LongIterable elements) Creates a new Elias–Fano prefix-sum long big list.EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.shorts.ShortIterable elements) Creates a new Elias–Fano prefix-sum long big list. -
Method Summary
Modifier and TypeMethodDescriptionlonggetLong(long index) Returns the element at the specified position.iterator()Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.listIterator(long from) Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.longprefixSum(long index) Returns the prefix sum of this list up to the given index.longsize64()Methods inherited from class EliasFanoMonotoneLongBigList
dump, dump, fits, get, get, getDelta, numBitsMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongBigList
add, add, add, addAll, addAll, addAll, addAll, addElements, addElements, clear, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, forEach, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekLong, pop, popLong, push, push, rem, remove, removeElements, removeLong, set, set, setElements, size, size, subList, top, topLong, toStringMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArrayMethods inherited from class AbstractCollection
isEmpty, toArray, toArrayMethods inherited from interface Collection
containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBigList
addAll, addAll, addAll, addAll, getElements, setElements, setElements, spliteratorMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
-
Constructor Details
-
EliasFanoPrefixSumLongBigList
public EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.longs.LongIterable elements) Creates a new Elias–Fano prefix-sum long big list.- Parameters:
elements- an iterable object.
-
EliasFanoPrefixSumLongBigList
public EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.ints.IntIterable elements) Creates a new Elias–Fano prefix-sum long big list.- Parameters:
elements- an iterable object.
-
EliasFanoPrefixSumLongBigList
public EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.shorts.ShortIterable elements) Creates a new Elias–Fano prefix-sum long big list.- Parameters:
elements- an iterable object.
-
EliasFanoPrefixSumLongBigList
public EliasFanoPrefixSumLongBigList(it.unimi.dsi.fastutil.bytes.ByteIterable elements) Creates a new Elias–Fano prefix-sum long big list.- Parameters:
elements- an iterable object.
-
-
Method Details
-
getLong
public long getLong(long index) Description copied from class:EliasFanoMonotoneLongBigListReturns the element at the specified position.- Specified by:
getLongin interfaceit.unimi.dsi.fastutil.longs.LongBigList- Overrides:
getLongin classEliasFanoMonotoneLongBigList- Parameters:
index- a position in the list.- Returns:
- the element at the specified position; if
indexis out of bounds, behavior is undefined.
-
prefixSum
public long prefixSum(long index) Returns the prefix sum of this list up to the given index.- Parameters:
index- an index from 0 to the length of this list.- Returns:
- the sum of the values with index between 0 (inclusive) and
index(exclusive).
-
size64
public long size64()- Specified by:
size64in interfaceit.unimi.dsi.fastutil.Size64- Overrides:
size64in classEliasFanoMonotoneLongBigList
-
listIterator
Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.Forward iteration will be faster than iterated calls to
getLong(). Backward iteration is available, but it will performs similarly togetLong().- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Long>- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.longs.LongBigList- Overrides:
listIteratorin classEliasFanoMonotoneLongBigList- Parameters:
from- the starting element in the list.- Returns:
- a list iterator over the values of this
EliasFanoPrefixSumLongBigList. - See Also:
-
listIterator
Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.Forward iteration will be faster than iterated calls to
getLong(). Backward iteration is available, but it will performs similarly togetLong().- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.BigList<Long>- Specified by:
listIteratorin interfaceit.unimi.dsi.fastutil.longs.LongBigList- Overrides:
listIteratorin classEliasFanoMonotoneLongBigList- Returns:
- a list iterator over the values of this
EliasFanoPrefixSumLongBigList. - See Also:
-
iterator
Returns a list iterator over the values of thisEliasFanoPrefixSumLongBigList.Forward iteration will be faster than iterated calls to
getLong(). Backward iteration is available, but it will performs similarly togetLong().- Specified by:
iteratorin interfaceCollection<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongBigList- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable- Overrides:
iteratorin classEliasFanoMonotoneLongBigList- Returns:
- a list iterator over the values of this
EliasFanoPrefixSumLongBigList. - See Also:
-