public final class MappedDecimalEncodedValue extends SimpleIntEncodedValue implements DecimalEncodedValue
FactorizedDecimalEncodedValueEncodedValue.InitializerConfigbwdDataIndex, fwdDataIndex| Constructor and Description |
|---|
MappedDecimalEncodedValue(String name,
Collection<Double> values,
double precision,
boolean storeBothDirections)
This class allows to store a value efficiently if it can take only a few decimal values that are not necessarily
consecutive.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDecimal(boolean reverse,
IntsRef ref) |
void |
setDecimal(boolean reverse,
IntsRef ref,
double value)
This method stores the specified double value (rounding with a previously defined factor) into the IntsRef.
|
equals, getInt, getName, hashCode, init, setInt, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetName, initpublic MappedDecimalEncodedValue(String name, Collection<Double> values, double precision, boolean storeBothDirections)
public final void setDecimal(boolean reverse,
IntsRef ref,
double value)
DecimalEncodedValuesetDecimal in interface DecimalEncodedValuepublic final double getDecimal(boolean reverse,
IntsRef ref)
getDecimal in interface DecimalEncodedValueCopyright © 2012–2019. All rights reserved.