|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<PackedInts.Format> org.apache.lucene.util.packed.PackedInts.Format
public static enum PackedInts.Format
A format to write packed ints.
Enum Constant Summary | |
---|---|
PACKED
Compact format, all bits are written contiguously. |
|
PACKED_SINGLE_BLOCK
A format that may insert padding bits to improve encoding and decoding speed. |
Field Summary | |
---|---|
int |
id
|
Method Summary | |
---|---|
static PackedInts.Format |
byId(int id)
Get a format according to its ID. |
long |
byteCount(int packedIntsVersion,
int valueCount,
int bitsPerValue)
Computes how many byte blocks are needed to store values
values of size bitsPerValue . |
int |
getId()
Returns the ID of the format. |
boolean |
isSupported(int bitsPerValue)
Tests whether the provided number of bits per value is supported by the format. |
int |
longCount(int packedIntsVersion,
int valueCount,
int bitsPerValue)
Computes how many long blocks are needed to store values
values of size bitsPerValue . |
float |
overheadPerValue(int bitsPerValue)
Returns the overhead per value, in bits. |
float |
overheadRatio(int bitsPerValue)
Returns the overhead ratio ( overhead per value / bits per value ). |
static PackedInts.Format |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static PackedInts.Format[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final PackedInts.Format PACKED
public static final PackedInts.Format PACKED_SINGLE_BLOCK
PackedInts.fastestFormatAndBits(int, int, float)
to find the
format that best suits your needs.
Field Detail |
---|
public int id
Method Detail |
---|
public static PackedInts.Format[] values()
for (PackedInts.Format c : PackedInts.Format.values()) System.out.println(c);
public static PackedInts.Format valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static PackedInts.Format byId(int id)
public int getId()
public long byteCount(int packedIntsVersion, int valueCount, int bitsPerValue)
values
values of size bitsPerValue
.
public int longCount(int packedIntsVersion, int valueCount, int bitsPerValue)
values
values of size bitsPerValue
.
public boolean isSupported(int bitsPerValue)
public float overheadPerValue(int bitsPerValue)
public final float overheadRatio(int bitsPerValue)
overhead per value / bits per value
).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |