use of it.unimi.dsi.fastutil.ints.IntOpenHashSet in project symja_android_library by axkr.
the class IntDictionaryMap method selectIsIn.
@Override
public Selection selectIsIn(String... strings) {
IntOpenHashSet keys = new IntOpenHashSet(strings.length);
for (String string : strings) {
int 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.getInt(i))) {
results.add(i);
}
}
return results;
}
use of it.unimi.dsi.fastutil.ints.IntOpenHashSet in project symja_android_library by axkr.
the class IntDictionaryMap method selectIsIn.
@Override
public Selection selectIsIn(Collection<String> strings) {
IntOpenHashSet keys = new IntOpenHashSet(strings.size());
for (String string : strings) {
int 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.getInt(i))) {
results.add(i);
}
}
return results;
}
Aggregations