本文整理了Java中it.unimi.dsi.fastutil.ints.IntSet.retainAll()
方法的一些代码示例,展示了IntSet.retainAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IntSet.retainAll()
方法的具体详情如下:
包路径:it.unimi.dsi.fastutil.ints.IntSet
类名称:IntSet
方法名:retainAll
暂无
代码示例来源:origin: mezz/JustEnoughItems
/**
* Efficiently get the elements contained in both sets.
* Note that this implementation will alter the original sets.
*/
private static IntSet intersection(IntSet set1, IntSet set2) {
if (set1.size() > set2.size()) {
set2.retainAll(set1);
return set2;
} else {
set1.retainAll(set2);
return set1;
}
}
代码示例来源:origin: org.datavec/datavec-dataframe
public Selection apply(Table relation) {
IntColumn intColumn = (IntColumn) relation.column(columnReference.getColumnName());
IntSet firstSet = intColumn.asSet();
firstSet.retainAll(filterColumn.data());
return intColumn.select(firstSet::contains);
}
}
内容来源于网络,如有侵权,请联系作者删除!