use of it.unimi.dsi.fastutil.ints.IntIterator in project ignite by apache.
the class SparseMatrix method nonZeroElements.
/**
* {@inheritDoc}
*/
@Override
public int nonZeroElements() {
int res = 0;
IntIterator rowIter = indexesMap().keySet().iterator();
while (rowIter.hasNext()) {
int row = rowIter.nextInt();
res += indexesMap().get(row).size();
}
return res;
}
Aggregations