Class MappedEliasFanoMonotoneLongBigList.MappedEliasFanoMonotoneLongBigListIterator
java.lang.Object
it.unimi.dsi.sux4j.util.MappedEliasFanoMonotoneLongBigList.MappedEliasFanoMonotoneLongBigListIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Long>, it.unimi.dsi.fastutil.BigListIterator<Long>, it.unimi.dsi.fastutil.longs.LongBidirectionalIterator, it.unimi.dsi.fastutil.longs.LongBigListIterator, it.unimi.dsi.fastutil.longs.LongIterator, it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Long>, it.unimi.dsi.fastutil.objects.ObjectIterator<Long>, Iterator<Long>, PrimitiveIterator<Long, LongConsumer>, PrimitiveIterator.OfLong
- Enclosing class:
MappedEliasFanoMonotoneLongBigList
public class MappedEliasFanoMonotoneLongBigList.MappedEliasFanoMonotoneLongBigListIterator
extends Object
implements it.unimi.dsi.fastutil.longs.LongBigListIterator
A list iterator over the values of this
MappedEliasFanoMonotoneLongBigList.
Forward iteration will be faster than iterated calls to
getLong(). Backward iteration is available,
but it will perform similarly to getLong().
Additional unsafe methods nextLongUnsafe() and previousLongUnsafe()
iterate without checking for the existence of a next element.
-
Nested Class Summary
Nested classes/interfaces inherited from interface PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe index of the next element to return.protected longThe current position in the array of lower bits.protected longThe current window.protected longThe current word in the array of upper bits. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()booleanlonglongnextLong()longReturns the same element asnextLong(), ifhasNext()is true; otherwise, behavior is undefined.longlonglongReturns the same element aspreviousLong(), ifhasPrevious()is true; otherwise, behavior is undefined.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back, previousMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBigListIterator
add, add, back, set, set, skip, skipMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator
forEachRemaining, forEachRemaining, nextMethods inherited from interface PrimitiveIterator.OfLong
forEachRemaining
-
Field Details
-
index
protected long indexThe index of the next element to return. -
word
protected long wordThe current word in the array of upper bits. -
window
protected long windowThe current window. -
lowerBitsPosition
protected long lowerBitsPositionThe current position in the array of lower bits.
-
-
Constructor Details
-
MappedEliasFanoMonotoneLongBigListIterator
protected MappedEliasFanoMonotoneLongBigListIterator(long from)
-
-
Method Details
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Long>
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Long>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Long>
-
hasNext
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceit.unimi.dsi.fastutil.longs.LongIterator- Specified by:
nextLongin interfacePrimitiveIterator.OfLong
-
nextLongUnsafe
public long nextLongUnsafe()Returns the same element asnextLong(), ifhasNext()is true; otherwise, behavior is undefined.- Returns:
- the same element as
nextLong(), ifhasNext()is true; otherwise, behavior is undefined.
-
previousLong
public long previousLong()- Specified by:
previousLongin interfaceit.unimi.dsi.fastutil.longs.LongBidirectionalIterator
-
previousLongUnsafe
public long previousLongUnsafe()Returns the same element aspreviousLong(), ifhasPrevious()is true; otherwise, behavior is undefined.- Returns:
- the same element as
previousLong(), ifhasPrevious()is true; otherwise, behavior is undefined.
-