Search in sources :

Example 51 with BitmapBackedSelection

use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.

the class ShortColumn method isNotIn.

public Selection isNotIn(final int... numbers) {
    final Selection results = new BitmapBackedSelection();
    results.addRange(0, size());
    results.andNot(isIn(numbers));
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Example 52 with BitmapBackedSelection

use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.

the class DoubleColumn method isNotIn.

public Selection isNotIn(final double... doubles) {
    final Selection results = new BitmapBackedSelection();
    results.addRange(0, size());
    results.andNot(isIn(doubles));
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Example 53 with BitmapBackedSelection

use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.

the class DoubleColumn method isIn.

public Selection isIn(final double... doubles) {
    final Selection results = new BitmapBackedSelection();
    final DoubleRBTreeSet doubleSet = new DoubleRBTreeSet(doubles);
    for (int i = 0; i < size(); i++) {
        if (doubleSet.contains(getDouble(i))) {
            results.add(i);
        }
    }
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Example 54 with BitmapBackedSelection

use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.

the class TextColumn method isNotIn.

@Override
public Selection isNotIn(Collection<String> strings) {
    Selection results = new BitmapBackedSelection();
    results.addRange(0, size());
    results.andNot(isIn(strings));
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Example 55 with BitmapBackedSelection

use of tech.tablesaw.selection.BitmapBackedSelection in project symja_android_library by axkr.

the class Rows method head.

public static void head(int rowCount, Table oldTable, Table newTable) {
    Selection rows = new BitmapBackedSelection(rowCount);
    for (int i = 0; i < rowCount; i++) {
        rows.add(i);
    }
    copyRowsToTable(rows, oldTable, newTable);
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Aggregations

BitmapBackedSelection (tech.tablesaw.selection.BitmapBackedSelection)79 Selection (tech.tablesaw.selection.Selection)79 IntArrayList (it.unimi.dsi.fastutil.ints.IntArrayList)31 PivotTable (tech.tablesaw.aggregate.PivotTable)3 ByteOpenHashSet (it.unimi.dsi.fastutil.bytes.ByteOpenHashSet)2 IntIterator (it.unimi.dsi.fastutil.ints.IntIterator)2 IntOpenHashSet (it.unimi.dsi.fastutil.ints.IntOpenHashSet)2 ShortOpenHashSet (it.unimi.dsi.fastutil.shorts.ShortOpenHashSet)2 IExpr (org.matheclipse.core.interfaces.IExpr)2 ByteArrayList (it.unimi.dsi.fastutil.bytes.ByteArrayList)1 ByteIterator (it.unimi.dsi.fastutil.bytes.ByteIterator)1 IntRBTreeSet (it.unimi.dsi.fastutil.ints.IntRBTreeSet)1 ByteBuffer (java.nio.ByteBuffer)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 CategoricalColumn (tech.tablesaw.api.CategoricalColumn)1 DoubleColumn (tech.tablesaw.api.DoubleColumn)1 Column (tech.tablesaw.columns.Column)1