public class UnboundedHilbertSFCOperations extends Object implements HilbertSFCOperations
| Modifier and Type | Field and Description |
|---|---|
protected BigDecimal[] |
binsPerDimension |
protected BigInteger |
maxHilbertValue |
protected BigInteger |
minHilbertValue |
protected static BigInteger |
UNIT_CELL_SIZE |
| Constructor and Description |
|---|
UnboundedHilbertSFCOperations() |
| Modifier and Type | Method and Description |
|---|---|
MultiDimensionalNumericData |
convertFromHilbert(byte[] hilbertValue,
com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve,
SFCDimensionDefinition[] dimensionDefinitions)
Convert the single SFC value to the ranges of raw values that it represents
|
byte[] |
convertToHilbert(Double[] values,
com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve,
SFCDimensionDefinition[] dimensionDefinitions)
Convert the raw values (ordered per dimension) to a single SFC value
|
RangeDecomposition |
decomposeRange(NumericData[] rangePerDimension,
com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve,
SFCDimensionDefinition[] dimensionDefinitions,
int totalPrecision,
int maxFilteredIndexedRanges,
boolean removeVacuum,
boolean overInclusiveOnEdge)
Decompose the raw range per dimension values into an optimal set of compact Hilbert SFC ranges
|
BigInteger |
getEstimatedIdCount(MultiDimensionalNumericData data,
SFCDimensionDefinition[] dimensionDefinitions)
Get a quick (minimal complexity calculation) estimate of the total row IDs a particular data
would require to fully cover with SFC values
|
double[] |
getInsertionIdRangePerDimension(SFCDimensionDefinition[] dimensionDefinitions)
* Get the range/size of a single insertion ID for each dimension
|
long[] |
indicesFromHilbert(byte[] hilbertValue,
com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve,
SFCDimensionDefinition[] dimensionDefinitions)
Convert the single SFC value to the per dimension SFC coordinates that it represents
|
void |
init(SFCDimensionDefinition[] dimensionDefs)
initialize this set of operations with the given dimension definitions
|
long[] |
normalizeRange(double minValue,
double maxValue,
int dimension,
SFCDimensionDefinition boundedDimensionDefinition)
Determines the coordinates a given range will span within this space filling curve.
|
protected static final BigInteger UNIT_CELL_SIZE
protected BigDecimal[] binsPerDimension
protected BigInteger minHilbertValue
protected BigInteger maxHilbertValue
public void init(SFCDimensionDefinition[] dimensionDefs)
HilbertSFCOperationsinit in interface HilbertSFCOperationsdimensionDefs - the dimension definitions to usepublic byte[] convertToHilbert(Double[] values, com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve, SFCDimensionDefinition[] dimensionDefinitions)
HilbertSFCOperationsconvertToHilbert in interface HilbertSFCOperationsvalues - a raw value per dimension in ordercompactHilbertCurve - the compact Hilbert curve to use for the conversiondimensionDefinitions - a set of dimension definitions to use to normalize the raw valuespublic long[] indicesFromHilbert(byte[] hilbertValue,
com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve,
SFCDimensionDefinition[] dimensionDefinitions)
HilbertSFCOperationsindicesFromHilbert in interface HilbertSFCOperationshilbertValue - the computed hilbert value to invert back to integer coordinates per
dimensioncompactHilbertCurve - the compact Hilbert curve to use for the conversiondimensionDefinitions - a set of dimension definitions to use to determine the bits of
precision per dimension that is expected in the compact hilbert curvepublic MultiDimensionalNumericData convertFromHilbert(byte[] hilbertValue, com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve, SFCDimensionDefinition[] dimensionDefinitions)
HilbertSFCOperationsconvertFromHilbert in interface HilbertSFCOperationshilbertValue - the computed hilbert value to invert back to native coordinatescompactHilbertCurve - the compact Hilbert curve to use for the conversiondimensionDefinitions - a set of dimension definitions to use to normalize the raw valuespublic RangeDecomposition decomposeRange(NumericData[] rangePerDimension, com.google.uzaygezen.core.CompactHilbertCurve compactHilbertCurve, SFCDimensionDefinition[] dimensionDefinitions, int totalPrecision, int maxFilteredIndexedRanges, boolean removeVacuum, boolean overInclusiveOnEdge)
HilbertSFCOperationsdecomposeRange in interface HilbertSFCOperationsrangePerDimension - the raw range per dimensioncompactHilbertCurve - the compact Hilbert curve to use for the conversiondimensionDefinitions - a set of dimension definitions to use to normalize the raw valuestotalPrecision - the total precision of the dimension definitions, for conveniencemaxFilteredIndexedRanges - the maximum number of ranges, if < 0 it will be unlimitedremoveVacuum - a flag to pass to the compact hilbert curve range decompositionpublic BigInteger getEstimatedIdCount(MultiDimensionalNumericData data, SFCDimensionDefinition[] dimensionDefinitions)
HilbertSFCOperationsgetEstimatedIdCount in interface HilbertSFCOperationsdata - the datasetdimensionDefinitions - a set of dimension definitions to use to normalize the raw valuespublic double[] getInsertionIdRangePerDimension(SFCDimensionDefinition[] dimensionDefinitions)
HilbertSFCOperationsgetInsertionIdRangePerDimension in interface HilbertSFCOperationsdimensionDefinitions - a set of dimension definitions to use to calculate the range of
each insertion IDpublic long[] normalizeRange(double minValue,
double maxValue,
int dimension,
SFCDimensionDefinition boundedDimensionDefinition)
throws IllegalArgumentException
HilbertSFCOperationsnormalizeRange in interface HilbertSFCOperationsminValue - the minimum valuemaxValue - the maximum valuedimension - the ordinal of the dimension on this space filling curveboundedDimensionDefinition - the dimension definition to use to normalize the raw valuesIllegalArgumentExceptionCopyright © 2013–2022. All rights reserved.