public interface DecimalEncodedValue extends EncodedValue
DecimalEncodedValueImpl
EncodedValue.InitializerConfig
Modifier and Type | Method and Description |
---|---|
double |
getDecimal(boolean reverse,
IntsRef ref) |
double |
getMaxOrMaxStorableDecimal() |
double |
getMaxStorableDecimal()
The maximum double value this EncodedValue accepts for setDecimal without throwing an exception.
|
double |
getMinStorableDecimal()
The minimum double value this EncodedValue accepts for setDecimal without throwing an exception.
|
double |
getNextStorableValue(double value) |
double |
getSmallestNonZeroValue() |
void |
setDecimal(boolean reverse,
IntsRef ref,
double value)
This method stores the specified double value (rounding with a previously defined factor) into the IntsRef.
|
getName, init, isStoreTwoDirections
void setDecimal(boolean reverse, IntsRef ref, double value)
getMaxStorableDecimal()
double getDecimal(boolean reverse, IntsRef ref)
double getMaxStorableDecimal()
double getMinStorableDecimal()
double getMaxOrMaxStorableDecimal()
IntEncodedValue.getMaxOrMaxStorableInt()
double getNextStorableValue(double value)
getDecimal(boolean, com.graphhopper.storage.IntsRef)
returns the same value that we put in using setDecimal(boolean, com.graphhopper.storage.IntsRef, double)
.
For example if the internal scaling factor is 3 calling getDecimal after setDecimal(reverse, ref, 5) will return
6 not 5! The value returned by this method is guaranteed to be storable without such a modification.double getSmallestNonZeroValue()
Copyright © 2012–2022. All rights reserved.