Search in sources :

Example 1 with ShortSet

use of it.unimi.dsi.fastutil.shorts.ShortSet in project symja_android_library by axkr.

the class ShortColumn method unique.

@Override
public ShortColumn unique() {
    final ShortSet values = new ShortOpenHashSet();
    for (int i = 0; i < size(); i++) {
        values.add(getShort(i));
    }
    final ShortColumn column = ShortColumn.create(name() + " Unique values");
    for (short value : values) {
        column.append(value);
    }
    return column;
}
Also used : ShortSet(it.unimi.dsi.fastutil.shorts.ShortSet) ShortOpenHashSet(it.unimi.dsi.fastutil.shorts.ShortOpenHashSet)

Aggregations

ShortOpenHashSet (it.unimi.dsi.fastutil.shorts.ShortOpenHashSet)1 ShortSet (it.unimi.dsi.fastutil.shorts.ShortSet)1