use of it.unimi.dsi.fastutil.bytes.ByteOpenHashSet in project symja_android_library by axkr.
the class ByteDictionaryMap method selectIsIn.
@Override
public Selection selectIsIn(String... strings) {
ByteOpenHashSet keys = new ByteOpenHashSet();
for (String string : strings) {
byte key = getKeyForValue(string);
if (key != DEFAULT_RETURN_VALUE) {
keys.add(key);
}
}
Selection results = new BitmapBackedSelection();
for (int i = 0; i < values.size(); i++) {
if (keys.contains(values.getByte(i))) {
results.add(i);
}
}
return results;
}
use of it.unimi.dsi.fastutil.bytes.ByteOpenHashSet in project symja_android_library by axkr.
the class ByteDictionaryMap method selectIsIn.
@Override
public Selection selectIsIn(Collection<String> strings) {
ByteOpenHashSet keys = new ByteOpenHashSet();
for (String string : strings) {
byte key = getKeyForValue(string);
if (key != DEFAULT_RETURN_VALUE) {
keys.add(key);
}
}
Selection results = new BitmapBackedSelection();
for (int i = 0; i < values.size(); i++) {
if (keys.contains(values.getByte(i))) {
results.add(i);
}
}
return results;
}
use of it.unimi.dsi.fastutil.bytes.ByteOpenHashSet in project symja_android_library by axkr.
the class BooleanColumn method unique.
@Override
public BooleanColumn unique() {
ByteSet count = new ByteOpenHashSet(3);
for (byte next : data) {
count.add(next);
}
ByteArrayList list = new ByteArrayList(count);
return new BooleanColumn(name() + " Unique values", list);
}
Aggregations