本文整理了Java中it.unimi.dsi.fastutil.ints.IntSet.toIntArray()
方法的一些代码示例,展示了IntSet.toIntArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IntSet.toIntArray()
方法的具体详情如下:
包路径:it.unimi.dsi.fastutil.ints.IntSet
类名称:IntSet
方法名:toIntArray
暂无
代码示例来源:origin: apache/incubator-pinot
@Override
public int[] getMatchingDictIds() {
if (_matchingDictIds == null) {
_matchingDictIds = _matchingDictIdSet.toIntArray();
}
return _matchingDictIds;
}
}
代码示例来源:origin: apache/incubator-pinot
@Override
public int[] getMatchingDictIds() {
if (_matchingDictIds == null) {
_matchingDictIds = _matchingDictIdSet.toIntArray();
}
return _matchingDictIds;
}
}
代码示例来源:origin: apache/incubator-pinot
@Override
public int[] getNonMatchingDictIds() {
if (_nonMatchingDictIds == null) {
_nonMatchingDictIds = _nonMatchingDictIdSet.toIntArray();
}
return _nonMatchingDictIds;
}
}
代码示例来源:origin: apache/mahout
public Iterator<MatrixSlice> iterateNonEmpty() {
final int[] keys = rowVectors.keySet().toIntArray();
return new AbstractIterator<MatrixSlice>() {
private int slice;
@Override
protected MatrixSlice computeNext() {
if (slice >= rowVectors.size()) {
return endOfData();
}
int i = keys[slice];
Vector row = rowVectors.get(i);
slice++;
return new MatrixSlice(row, i);
}
};
}
代码示例来源:origin: apache/mahout
/** special method necessary for efficient serialization */
public IntArrayList nonZeroRowIndices() {
return new IntArrayList(rowVectors.keySet().toIntArray());
}
代码示例来源:origin: jtablesaw/tablesaw
@Override
public TimeColumn unique() {
IntSet ints = new IntOpenHashSet(data);
TimeColumn column = emptyCopy(ints.size());
column.data = IntArrayList.wrap(ints.toIntArray());
column.setName(name() + " Unique values");
return column;
}
代码示例来源:origin: jtablesaw/tablesaw
@Override
public DateColumn unique() {
IntSet ints = new IntOpenHashSet(data.size());
for (int i = 0; i < size(); i++) {
ints.add(data.getInt(i));
}
DateColumn copy = emptyCopy(ints.size());
copy.setName(name() + " Unique values");
copy.data = IntArrayList.wrap(ints.toIntArray());
return copy;
}
代码示例来源:origin: com.linkedin.zoie/zoie-core
public int[] toIntArray(int[] a)
{
return _set.toIntArray(a);
}
}
代码示例来源:origin: com.linkedin.zoie/zoie-core
public int[] toIntArray()
{
return _set.toIntArray();
}
代码示例来源:origin: edu.emory.mathcs.nlp/nlp4j-core
/**
* Get a sorted array of IDs of all the nodes in the subtree of the node.
* @return a sorted array of IDs from the subtree of the node (inclusive)
*/
public int[] getSubNodeIDSortedArray()
{
IntSet set = getSubNodeIDSet();
int[] list = set.toIntArray();
Arrays.sort(list);
return list;
}
代码示例来源:origin: emorynlp/nlp4j
/**
* Get a sorted array of IDs of all the nodes in the subtree of the node.
* @return a sorted array of IDs from the subtree of the node (inclusive)
*/
public int[] getSubNodeIDSortedArray()
{
IntSet set = getSubNodeIDSet();
int[] list = set.toIntArray();
Arrays.sort(list);
return list;
}
代码示例来源:origin: it.unimi.dsi/webgraph
private static final int[] set2sortedArray(final IntSet subgraphNodes) {
final int a[] = subgraphNodes.toIntArray();
IntArrays.parallelQuickSort(a);
return a;
}
代码示例来源:origin: senseidb/bobo
@Override
public int[] convert(FacetDataCache<String> dataCache, String[] vals) {
IntSet intSet = new IntOpenHashSet();
getFilters(dataCache, intSet, vals, _depth, _strict);
return intSet.toIntArray();
}
代码示例来源:origin: org.apache.mahout/mahout-math
/** special method necessary for efficient serialization */
public IntArrayList nonZeroRowIndices() {
return new IntArrayList(rowVectors.keySet().toIntArray());
}
代码示例来源:origin: it.unimi.di/mg4j
/** Creates a new subset lexical strategy.
* @param subset the subset of terms.
*/
public SubsetLexicalStrategy( final IntSet subset ) {
final int[] t = subset.toIntArray();
Arrays.sort( t );
localNumber = new Int2IntOpenHashMap();
localNumber.defaultReturnValue( -1 );
for( int i = 0; i < t.length; i++ ) localNumber.put( t[ i ], i );
}
代码示例来源:origin: it.unimi.di/mg4j
/** Creates a new subset lexical strategy.
* @param subset the subset of terms.
*/
public FrequencyLexicalStrategy( final IntSet subset ) {
final int[] t = subset.toIntArray();
Arrays.sort( t );
localNumber = new Int2IntOpenHashMap();
localNumber.defaultReturnValue( -1 );
for( int i = 0; i < t.length; i++ ) localNumber.put( t[ i ], i );
}
代码示例来源:origin: org.datavec/datavec-dataframe
@Override
public TimeColumn unique() {
IntSet ints = new IntOpenHashSet(data);
return TimeColumn.create(name() + " Unique values", IntArrayList.wrap(ints.toIntArray()));
}
代码示例来源:origin: tech.tablesaw/tablesaw-core
@Override
public TimeColumn unique() {
IntSet ints = new IntOpenHashSet(data);
TimeColumn column = emptyCopy(ints.size());
column.data = IntArrayList.wrap(ints.toIntArray());
column.setName(name() + " Unique values");
return column;
}
代码示例来源:origin: org.datavec/datavec-dataframe
@Override
public DateColumn unique() {
IntSet ints = new IntOpenHashSet(data.size());
for (int i = 0; i < size(); i++) {
ints.add(data.getInt(i));
}
return DateColumn.create(name() + " Unique values", IntArrayList.wrap(ints.toIntArray()));
}
代码示例来源:origin: tech.tablesaw/tablesaw-core
@Override
public DateColumn unique() {
IntSet ints = new IntOpenHashSet(data.size());
for (int i = 0; i < size(); i++) {
ints.add(data.getInt(i));
}
DateColumn copy = emptyCopy(ints.size());
copy.setName(name() + " Unique values");
copy.data = IntArrayList.wrap(ints.toIntArray());
return copy;
}
内容来源于网络,如有侵权,请联系作者删除!