50.1902);
dataPerDimension3[2] = new NumericRange(
cal.getTimeInMillis(),
calEnd.getTimeInMillis());
MultiDimensionalNumericData indexedData = new BasicNumericDataset(
dataPerDimension1);
final NumericIndexStrategy strategy = TieredSFCIndexFactory.createEqualIntervalPrecisionTieredStrategy(
SPATIAL_TEMPORAL_DIMENSIONS,
new int[] {
20,
20,
20
},
SFCType.HILBERT,
4);
final List<ByteArrayId> ids1 = strategy.getInsertionIds(indexedData);
assertEquals(
1,
ids1.size());
assertEquals(
10,
ids1.get(
0).getBytes().length);
// different bin bin
indexedData = new BasicNumericDataset(
dataPerDimension2);
final List<ByteArrayId> ids2 = strategy.getInsertionIds(indexedData);
assertEquals(
1,
ids2.size());
// different tier
assertFalse(compare(
ids1.get(
0).getBytes(),
ids2.get(
0).getBytes(),
1));
// same time
assertTrue(compare(
ids1.get(
0).getBytes(),
ids2.get(
0).getBytes(),
1,
5));
// different bin
indexedData = new BasicNumericDataset(
dataPerDimension3);
final List<ByteArrayId> ids3 = strategy.getInsertionIds(indexedData);
assertEquals(
1,
ids3.size());