use of org.bboxdb.distribution.partitioner.regionsplit.SimpleSplitStrategy in project bboxdb by jnidzwetzki.
the class TestSampling method testSimpleSplitpointStrategy1.
/**
* Test the simple splitpoint strategy
* @throws StorageManagerException
*/
@Test(timeout = 60000)
public void testSimpleSplitpointStrategy1() throws StorageManagerException {
final SplitpointStrategy splitpointStrategy = new SimpleSplitStrategy();
final BoundingBox coveringBox = new BoundingBox(1d, 2d, -1d, 20d);
final double splitPoint0 = splitpointStrategy.getSplitPoint(0, coveringBox);
final double splitPoint1 = splitpointStrategy.getSplitPoint(1, coveringBox);
Assert.assertTrue(coveringBox.isCoveringPointInDimension(splitPoint0, 0));
Assert.assertTrue(coveringBox.isCoveringPointInDimension(splitPoint1, 1));
}
Aggregations