public void begin() { _iter = _hashSet.iterator(); }
/** * Creates an iterator over the values of the set. * * @return an iterator with support for removals in the underlying set */ public Iterator iterator() { return new Iterator() { private final TIntIterator it = _set.iterator(); public Object next() { return wrap(it.next()); } public boolean hasNext() { return it.hasNext(); } public void remove() { it.remove(); } }; }
private int highestCommonPhaseNumber(TIntHashSet phaseSet) { int hcpn = -1; // Trove iterators cannot use for() constructs TIntIterator i = phaseSet.iterator(); while (i.hasNext()) { int phase = i.next(); hcpn = phase > hcpn ? phase : hcpn; } return hcpn; }
public TIntDoubleHashMap getTable(double[][] utilities) { TIntDoubleHashMap rank = new TIntDoubleHashMap( (int) (testSize + testSize * 0.25), (float) 0.75); for (int docId = 0; docId < testSize; docId++) { double sum = 0.0; for (TIntIterator it = categoriesFilter.iterator(); it.hasNext(); ) { int catId = it.next(); if (docCategoriesFilter[docId].contains(catId)) { sum += utilities[docId][catMap.get(catId)]; } } rank.put(docId, sum); } return rank; }
(int) (numOfCategories + numOfCategories * 0.25), (float) 0.75); int n = 0; for (TIntIterator it = categoriesFilter.iterator(); it.hasNext(); ) { catMap.put(it.next(), n); n++; for (TIntIterator it = categoriesFilter.iterator(); it.hasNext(); ) { int catId = it.next(); int currCat = catMap.get(catId);
for (TIntIterator it = categoriesFilter.iterator(); it.hasNext(); ) { int catId = it.next(); int currCat = catMap.get(catId);
TIntDoubleHashMap currGainsFP = new TIntDoubleHashMap(); TIntDoubleHashMap currGainsFN = new TIntDoubleHashMap(); for (TIntIterator it = categoriesFilter.iterator(); it.hasNext(); ) { int catId = it.next(); ContingencyTable newContingency = newEvaluation.getCategoryContingencyTable((short) catId);
distinctKeys.addAll(countsY.keys()); TIntIterator iterator = distinctKeys.iterator(); while (iterator.hasNext()) { key = iterator.next();
distinctKeys.addAll(countsY.keys()); TIntIterator iterator = distinctKeys.iterator(); while (iterator.hasNext()) { key = iterator.next();
distinctKeys.addAll(countsY.keys()); TIntIterator iterator = distinctKeys.iterator(); while (iterator.hasNext()) { key = iterator.next();