Search in sources :

Example 6 with Selection

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

the class StringColumn 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 7 with Selection

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

the class StringColumn method isNotIn.

@Override
public Selection isNotIn(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 8 with Selection

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

the class TextColumn method isIn.

@Override
public Selection isIn(Collection<String> strings) {
    Set<String> stringSet = Sets.newHashSet(strings);
    Selection results = new BitmapBackedSelection();
    for (int i = 0; i < size(); i++) {
        if (stringSet.contains(values.get(i))) {
            results.add(i);
        }
    }
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Example 9 with Selection

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

the class TextColumn method isNotIn.

@Override
public Selection isNotIn(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 10 with Selection

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

the class TextColumn method isIn.

@Override
public Selection isIn(String... strings) {
    Set<String> stringSet = Sets.newHashSet(strings);
    Selection results = new BitmapBackedSelection();
    for (int i = 0; i < size(); i++) {
        if (stringSet.contains(values.get(i))) {
            results.add(i);
        }
    }
    return results;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection)

Aggregations

Selection (tech.tablesaw.selection.Selection)85 BitmapBackedSelection (tech.tablesaw.selection.BitmapBackedSelection)80 IntArrayList (it.unimi.dsi.fastutil.ints.IntArrayList)31 PivotTable (tech.tablesaw.aggregate.PivotTable)3 BooleanColumn (tech.tablesaw.api.BooleanColumn)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 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)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