org.apache.lucene.util.packed
Interface PackedInts.Encoder

Enclosing class:
PackedInts

public static interface PackedInts.Encoder

An encoder for packed integers.


Method Summary
 int blockCount()
          The minimum number of long blocks to encode in a single call.
 void encode(int[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
          Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
 void encode(int[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
          Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
 void encode(long[] values, int valuesOffset, byte[] blocks, int blocksOffset, int iterations)
          Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.
 void encode(long[] values, int valuesOffset, long[] blocks, int blocksOffset, int iterations)
          Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.
 int valueCount()
          The number of values that can be stored in blockCount() long blocks.
 

Method Detail

blockCount

int blockCount()
The minimum number of long blocks to encode in a single call.


valueCount

int valueCount()
The number of values that can be stored in blockCount() long blocks.


encode

void encode(long[] values,
            int valuesOffset,
            long[] blocks,
            int blocksOffset,
            int iterations)
Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.

Parameters:
blocks - the long blocks that hold packed integer values
blocksOffset - the offset where to start writing blocks
values - the values buffer
valuesOffset - the offset where to start reading values
iterations - controls how much data to encode

encode

void encode(long[] values,
            int valuesOffset,
            byte[] blocks,
            int blocksOffset,
            int iterations)
Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.

Parameters:
blocks - the long blocks that hold packed integer values
blocksOffset - the offset where to start writing blocks
values - the values buffer
valuesOffset - the offset where to start reading values
iterations - controls how much data to encode

encode

void encode(int[] values,
            int valuesOffset,
            long[] blocks,
            int blocksOffset,
            int iterations)
Read iterations * valueCount() values from values, encode them and write iterations * blockCount() blocks into blocks.

Parameters:
blocks - the long blocks that hold packed integer values
blocksOffset - the offset where to start writing blocks
values - the values buffer
valuesOffset - the offset where to start reading values
iterations - controls how much data to encode

encode

void encode(int[] values,
            int valuesOffset,
            byte[] blocks,
            int blocksOffset,
            int iterations)
Read iterations * valueCount() values from values, encode them and write 8 * iterations * blockCount() blocks into blocks.

Parameters:
blocks - the long blocks that hold packed integer values
blocksOffset - the offset where to start writing blocks
values - the values buffer
valuesOffset - the offset where to start reading values
iterations - controls how much data to encode


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.