use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.
the class NumericColumn method isNotIn.
@Override
default Selection isNotIn(Collection<Number> numbers) {
final Selection results = new BitmapBackedSelection();
results.addRange(0, size());
results.andNot(isIn(numbers));
return results;
}
use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.
the class NumericColumn method eval.
@Override
default Selection eval(final BiPredicate<Number, Number> predicate, final Number number) {
final double value = number.doubleValue();
final Selection bitmap = new BitmapBackedSelection();
for (int idx = 0; idx < size(); idx++) {
final double next = getDouble(idx);
if (predicate.test(next, value)) {
bitmap.add(idx);
}
}
return bitmap;
}
use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.
the class FloatColumn method isIn.
public Selection isIn(final float... numbers) {
final Selection results = new BitmapBackedSelection();
final FloatRBTreeSet doubleSet = new FloatRBTreeSet(numbers);
for (int i = 0; i < size(); i++) {
if (doubleSet.contains(getFloat(i))) {
results.add(i);
}
}
return results;
}
use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.
the class FloatColumn method isNotIn.
public Selection isNotIn(final float... numbers) {
final Selection results = new BitmapBackedSelection();
results.addRange(0, size());
results.andNot(isIn(numbers));
return results;
}
use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.
the class ShortColumn method isIn.
public Selection isIn(final int... numbers) {
final Selection results = new BitmapBackedSelection();
final IntRBTreeSet intSet = new IntRBTreeSet(numbers);
for (int i = 0; i < size(); i++) {
if (intSet.contains(getInt(i))) {
results.add(i);
}
}
return results;
}
Aggregations