Package org.neo4j.graphalgo.core.loading
Class CompressedLongArray
- java.lang.Object
-
- org.neo4j.graphalgo.core.loading.CompressedLongArray
-
public final class CompressedLongArray extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CompressedLongArray(AllocationTracker tracker)
CompressedLongArray(AllocationTracker tracker, int numberOfProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long[] values, int start, int end, int valuesToAdd)
For memory efficiency, we reuse thevalues
.void
add(long[] values, long[][] allWeights, int start, int end, int valuesToAdd)
For memory efficiency, we reuse thevalues
.boolean
hasWeights()
int
length()
void
release()
byte[]
storage()
int
uncompress(long[] into)
-
-
-
Constructor Detail
-
CompressedLongArray
public CompressedLongArray(AllocationTracker tracker)
-
CompressedLongArray
public CompressedLongArray(AllocationTracker tracker, int numberOfProperties)
-
-
Method Detail
-
add
public void add(long[] values, int start, int end, int valuesToAdd)
For memory efficiency, we reuse thevalues
. They cannot be reused after calling this method.- Parameters:
values
- values to writestart
- start index in valuesend
- end index in values
-
add
public void add(long[] values, long[][] allWeights, int start, int end, int valuesToAdd)
For memory efficiency, we reuse thevalues
. They cannot be reused after calling this method.- Parameters:
values
- values to writeallWeights
- weights to writestart
- start index in values and weightsend
- end index in values and weightsvaluesToAdd
- the actual number of targets to import from this range
-
length
public int length()
-
uncompress
public int uncompress(long[] into)
-
storage
public byte[] storage()
-
hasWeights
public boolean hasWeights()
-
release
public void release()
-
-