public class XZOrderSFC extends Object implements SpaceFillingCurve
| Constructor and Description |
|---|
XZOrderSFC() |
XZOrderSFC(SFCDimensionDefinition[] dimensionDefs) |
| Modifier and Type | Method and Description |
|---|---|
RangeDecomposition |
decomposeRange(MultiDimensionalNumericData query,
boolean overInclusiveOnEdge,
int maxRanges)
* Returns a collection of ranges on the 1-d space filling curve that correspond to the
n-dimensional range described in the query parameter.
|
RangeDecomposition |
decomposeRangeFully(MultiDimensionalNumericData query)
* Returns a collection of ranges on the 1-d space filling curve that correspond to the
n-dimensional range described in the query parameter.
|
void |
fromBinary(byte[] bytes)
Convert a stream of binary bytes to fields and data within an object.
|
long[] |
getCoordinates(byte[] id)
* Gets n-dimensional coordinates from a single dimension
|
BigInteger |
getEstimatedIdCount(MultiDimensionalNumericData data)
* Determines the estimated number of rows a multi-dimensional range will span within this space
filling curve
|
byte[] |
getId(Double[] values)
* Maps a n-dimensional value to a single dimension, i.e.
|
double[] |
getInsertionIdRangePerDimension()
* Get the range/size of a single insertion ID for each dimension
|
MultiDimensionalNumericData |
getRanges(byte[] id)
* Gets n-dimensional ranges from a single dimension, i.e.
|
long[] |
normalizeRange(double minValue,
double maxValue,
int dimension)
* Determines the coordinates within this space filling curve for a dimension given a range
|
byte[] |
toBinary()
Convert fields and data within an object to binary form for transmission or storage.
|
public XZOrderSFC()
public XZOrderSFC(SFCDimensionDefinition[] dimensionDefs)
public byte[] getId(Double[] values)
SpaceFillingCurvegetId in interface SpaceFillingCurvevalues - n-dimensional value to be encoded in the SFC. The size of value corresponds to
the number of dimensionspublic RangeDecomposition decomposeRangeFully(MultiDimensionalNumericData query)
SpaceFillingCurveThis method will decompose the range all the way down to the unit interval of 1.
decomposeRangeFully in interface SpaceFillingCurvequery - describes the n-dimensional query window that will be decomposedpublic RangeDecomposition decomposeRange(MultiDimensionalNumericData query, boolean overInclusiveOnEdge, int maxRanges)
SpaceFillingCurveThis method will roll up the ranges based on the maxRanges parameter. Ranges will be "connected" based on the minimization of distance between the end of one range and the start of the next.
decomposeRange in interface SpaceFillingCurvequery - describes the n-dimensional query window that will be decomposedpublic byte[] toBinary()
PersistabletoBinary in interface Persistablepublic void fromBinary(byte[] bytes)
PersistablefromBinary in interface Persistablepublic double[] getInsertionIdRangePerDimension()
SpaceFillingCurvegetInsertionIdRangePerDimension in interface SpaceFillingCurvepublic BigInteger getEstimatedIdCount(MultiDimensionalNumericData data)
SpaceFillingCurvegetEstimatedIdCount in interface SpaceFillingCurvedata - describes the n-dimensional range to estimate the row count forpublic MultiDimensionalNumericData getRanges(byte[] id)
SpaceFillingCurvegetRanges in interface SpaceFillingCurveid - the SFC ID to calculate the ranges of values represented.public long[] getCoordinates(byte[] id)
SpaceFillingCurvegetCoordinates in interface SpaceFillingCurveid - the SFC ID to calculate the coordinates for each dimension.public long[] normalizeRange(double minValue,
double maxValue,
int dimension)
SpaceFillingCurvenormalizeRange in interface SpaceFillingCurveminValue - describes the minimum of a range in a single dimension used to determine the
SFC coordinate rangemaxValue - describes the maximum of a range in a single dimension used to determine the
SFC coordinate rangedimension - the dimensionCopyright © 2013–2022. All rights reserved.