use of io.questdb.std.LongList in project questdb by bluestreak01.
the class IntervalUtilsTest method testIntersectInplace2.
@Test
public void testIntersectInplace2() {
LongList intervals = new LongList();
// A
add(intervals, -1, 10);
// B
add(intervals, 1, 2);
add(intervals, 4, 5);
runTestIntersectInplace(intervals, 2, "[1,2], [4,5]");
}
use of io.questdb.std.LongList in project questdb by bluestreak01.
the class IntervalUtilsTest method testUnionEmpty2.
@Test
public void testUnionEmpty2() {
LongList intervals = new LongList();
// A
runTestUnionInplace(intervals, 0, "");
}
use of io.questdb.std.LongList in project questdb by bluestreak01.
the class IntervalUtilsTest method testIntersectEmpty.
@Test
public void testIntersectEmpty() {
LongList intervals = new LongList();
// A
// B
add(intervals, -20, -2);
add(intervals, 1, 2);
runTestIntersectInplace(intervals, 0, "");
}
use of io.questdb.std.LongList in project questdb by bluestreak01.
the class IntervalUtilsTest method testInvertWithNegativeInfinity.
@Test
public void testInvertWithNegativeInfinity() {
LongList intervals = new LongList();
// A
intervals.add(1);
// B
add(intervals, 2, 100);
add(intervals, 200, Long.MAX_VALUE);
runTestInvertInplace(intervals, 1, "[NaN,1], [101,199]");
}
use of io.questdb.std.LongList in project questdb by bluestreak01.
the class IntervalUtilsTest method testIsInListWithOddNumberOfIntervals.
@Test
public void testIsInListWithOddNumberOfIntervals() {
LongList intervals = new LongList();
add(intervals, 100, 102);
add(intervals, 122, 124);
add(intervals, 150, 155);
Assert.assertFalse(IntervalUtils.isInIntervals(intervals, 99));
Assert.assertTrue(IntervalUtils.isInIntervals(intervals, 101));
Assert.assertFalse(IntervalUtils.isInIntervals(intervals, 103));
Assert.assertTrue(IntervalUtils.isInIntervals(intervals, 123));
Assert.assertFalse(IntervalUtils.isInIntervals(intervals, 125));
Assert.assertTrue(IntervalUtils.isInIntervals(intervals, 151));
Assert.assertFalse(IntervalUtils.isInIntervals(intervals, 156));
}
Aggregations