Search in sources :

Example 66 with Selection

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

the class ShortIndex method greaterThan.

public Selection greaterThan(short value) {
    Selection selection = new BitmapBackedSelection();
    Short2ObjectSortedMap<IntArrayList> tail = index.tailMap((short) (value + 1));
    for (IntArrayList keys : tail.values()) {
        addAllToSelection(keys, selection);
    }
    return selection;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) IntArrayList(it.unimi.dsi.fastutil.ints.IntArrayList)

Example 67 with Selection

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

the class DoubleIndex method greaterThan.

public Selection greaterThan(double value) {
    Selection selection = new BitmapBackedSelection();
    Double2ObjectSortedMap<IntArrayList> tail = index.tailMap(value + 0.000001);
    for (IntArrayList keys : tail.values()) {
        addAllToSelection(keys, selection);
    }
    return selection;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) IntArrayList(it.unimi.dsi.fastutil.ints.IntArrayList)

Example 68 with Selection

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

the class LongIndex method greaterThan.

public Selection greaterThan(long value) {
    Selection selection = new BitmapBackedSelection();
    Long2ObjectSortedMap<IntArrayList> tail = index.tailMap(value + 1);
    for (IntArrayList keys : tail.values()) {
        addAllToSelection(keys, selection);
    }
    return selection;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) IntArrayList(it.unimi.dsi.fastutil.ints.IntArrayList)

Example 69 with Selection

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

the class LongIndex method get.

/**
 * Returns a bitmap containing row numbers of all cells matching the given long
 *
 * @param value This is a 'key' from the index perspective, meaning it is a value from the
 *     standpoint of the column
 */
public Selection get(long value) {
    Selection selection = new BitmapBackedSelection();
    IntArrayList list = index.get(value);
    if (list != null) {
        addAllToSelection(list, selection);
    }
    return selection;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) IntArrayList(it.unimi.dsi.fastutil.ints.IntArrayList)

Example 70 with Selection

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

the class StringIndex method get.

/**
 * Returns a bitmap containing row numbers of all cells matching the given int
 *
 * @param value This is a 'key' from the index perspective, meaning it is a value from the
 *     standpoint of the column
 */
public Selection get(String value) {
    Selection selection = new BitmapBackedSelection();
    IntArrayList list = index.get(value);
    if (list != null) {
        addAllToSelection(list, selection);
    }
    return selection;
}
Also used : BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) Selection(tech.tablesaw.selection.Selection) BitmapBackedSelection(tech.tablesaw.selection.BitmapBackedSelection) IntArrayList(it.unimi.dsi.fastutil.ints.IntArrayList)

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