Package org.neo4j.graphalgo.core.huge
Class TransientAdjacencyList.DecompressingCursor
- java.lang.Object
-
- org.neo4j.graphalgo.core.loading.MutableIntValue
-
- org.neo4j.graphalgo.core.huge.TransientAdjacencyList.DecompressingCursor
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,AdjacencyCursor
- Enclosing class:
- TransientAdjacencyList
public static final class TransientAdjacencyList.DecompressingCursor extends MutableIntValue implements AdjacencyCursor
-
-
Field Summary
-
Fields inherited from class org.neo4j.graphalgo.core.loading.MutableIntValue
value
-
Fields inherited from interface org.neo4j.graphalgo.api.AdjacencyCursor
NOT_FOUND
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
advance(long target)
Read and decode target ids until it is larger than or equal (>=) the providedtarget
.void
close()
void
copyFrom(AdjacencyCursor other)
Copy iteration state from another cursor without changingother
.boolean
hasNextVLong()
Return true iff there is at least one more target to decode.void
init(long fromIndex)
Initialize this cursor to point to the givenindex
.long
nextVLong()
Read and decode the next target id.long
peekVLong()
Decode and peek the next target id.int
remaining()
Return how many targets are still left to be decoded.int
size()
Return how many targets can be decoded in total.long
skipUntil(long target)
Read and decode target ids until it is strictly larger than (>) the providedtarget
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.neo4j.graphalgo.api.AdjacencyCursor
initializedTo
-
-
-
-
Method Detail
-
init
public void init(long fromIndex)
Description copied from interface:AdjacencyCursor
Initialize this cursor to point to the givenindex
.- Specified by:
init
in interfaceAdjacencyCursor
-
copyFrom
public void copyFrom(AdjacencyCursor other)
Copy iteration state from another cursor without changingother
.- Specified by:
copyFrom
in interfaceAdjacencyCursor
-
size
public int size()
Description copied from interface:AdjacencyCursor
Return how many targets can be decoded in total. This is equivalent to the degree.- Specified by:
size
in interfaceAdjacencyCursor
-
remaining
public int remaining()
Description copied from interface:AdjacencyCursor
Return how many targets are still left to be decoded.- Specified by:
remaining
in interfaceAdjacencyCursor
-
hasNextVLong
public boolean hasNextVLong()
Description copied from interface:AdjacencyCursor
Return true iff there is at least one more target to decode.- Specified by:
hasNextVLong
in interfaceAdjacencyCursor
-
nextVLong
public long nextVLong()
Description copied from interface:AdjacencyCursor
Read and decode the next target id. It is undefined behavior if this is called afterAdjacencyCursor.hasNextVLong()
returnsfalse
.- Specified by:
nextVLong
in interfaceAdjacencyCursor
-
peekVLong
public long peekVLong()
Description copied from interface:AdjacencyCursor
Decode and peek the next target id. Does not progress the internal cursor unlikeAdjacencyCursor.nextVLong()
.- Specified by:
peekVLong
in interfaceAdjacencyCursor
-
skipUntil
public long skipUntil(long target)
Read and decode target ids until it is strictly larger than (>) the providedtarget
. Might return an id that is less than or equal totarget
iff the cursor did exhaust before finding an id that is large enough.skipUntil(target) <= target
can be used to distinguish the no-more-ids case and afterwardshasNextVLong()
will returnfalse
- Specified by:
skipUntil
in interfaceAdjacencyCursor
-
advance
public long advance(long target)
Read and decode target ids until it is larger than or equal (>=) the providedtarget
. Might return an id that is less thantarget
iff the cursor did exhaust before finding an id that is large enough.advance(target) < target
can be used to distinguish the no-more-ids case and afterwardshasNextVLong()
will returnfalse
- Specified by:
advance
in interfaceAdjacencyCursor
-
close
public void close()
- Specified by:
close
in interfaceAdjacencyCursor
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-