Class CompressedLongArray


  • public final class CompressedLongArray
    extends java.lang.Object
    • 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 the values.
      void add​(long[] values, long[][] allWeights, int start, int end, int valuesToAdd)
      For memory efficiency, we reuse the values.
      boolean hasWeights()  
      int length()  
      void release()  
      byte[] storage()  
      int uncompress​(long[] into)  
      long[][] weights()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CompressedLongArray

        public CompressedLongArray​(AllocationTracker allocationTracker)
      • CompressedLongArray

        public CompressedLongArray​(AllocationTracker allocationTracker,
                                   int numberOfProperties)
    • Method Detail

      • add

        public void add​(long[] values,
                        int start,
                        int end,
                        int valuesToAdd)
        For memory efficiency, we reuse the values. They cannot be reused after calling this method.
        Parameters:
        values - values to write
        start - start index in values
        end - end index in values
      • add

        public void add​(long[] values,
                        long[][] allWeights,
                        int start,
                        int end,
                        int valuesToAdd)
        For memory efficiency, we reuse the values. They cannot be reused after calling this method.
        Parameters:
        values - values to write
        allWeights - weights to write
        start - start index in values and weights
        end - end index in values and weights
        valuesToAdd - the actual number of targets to import from this range
      • length

        public int length()
      • uncompress

        public int uncompress​(long[] into)
      • storage

        public byte[] storage()
      • weights

        public long[][] weights()
      • hasWeights

        public boolean hasWeights()
      • release

        public void release()