public Variable get(int idx) { int gidx = included.get (idx); return universe.get (gidx); }
public Object next() { int thisIdx = nextIdx; nextIdx++; return universe.get (included.get (thisIdx)); }
protected LogFormula getNextFormula() { m_currentTrainingExample++; if(m_currentTrainingExample>=m_trainingData.size()) return null; return generateFormulaForTrainingExample(m_trainingData.get(m_currentTrainingExample-1), m_trainingLabels.get(m_currentTrainingExample-1)); }
public Variable get(int idx) { int gidx = included.get (idx); return universe.get (gidx); }
public Object next() { int thisIdx = nextIdx; nextIdx++; return universe.get (included.get (thisIdx)); }
public Variable get(int idx) { int gidx = included.get (idx); return universe.get (gidx); }
public Object next() { int thisIdx = nextIdx; nextIdx++; return universe.get (included.get (thisIdx)); }
/** * Returns the value at the top of the stack. * * @return an <code>int</code> value */ public int peek() { return _list.get(_list.size() - 1); }
/** * Removes the value at <tt>offset</tt> from the list. * * @param offset an <code>int</code> value * @return the value previously stored at offset. */ public int remove(int offset) { int old = get(offset); remove(offset, 1); return old; }
/** {@inheritDoc} */ public int getDocumentLength() { try { return doi.getDocumentLength(pl_doc.get(index)); } catch (IOException e) { e.printStackTrace(); return -1; } }
public int getFreq(int docid) { int index = pl_doc.binarySearch(docid); if (index >= 0) { return pl_freq.get(index); } return -1; }
public DocumentIndexEntry next() { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index++)); return die; }
/** {@inheritDoc} */ public DocumentIndexEntry getDocumentEntry(int docid) throws IOException { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(docid)); return die; }
public void computeDistances(IWeighting3D dists, ISimilarityFunction func) { for (int i = 0; i < documents.size(); i++) { int docID = documents.get(i); double d = func.computeSimilarity(features, dists, docID); distances.set(i, d); } }
public DocumentIndexEntry next() { FieldDocumentIndexEntry die = new FieldDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index)); die.setFieldLengths(fieldLengths.get(index++).toNativeArray()); return die; }
/** {@inheritDoc} */ public int getId() { if (pl_doc.size()==0) { // special case: the posting list is empty, but some retrieval code (i.e. DAAT retrieval) assumes // that each posting list must have at least one document in it. So we add a new document // with no terms in it pl_doc.add(0); pl_freq.add(0); } return pl_doc.get(index); }
public Entry<Integer, DocumentIndexEntry> next() { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index++)); Entry<Integer, DocumentIndexEntry> e = new MapEntry<Integer, DocumentIndexEntry>(index, die); return e; }
public Entry<Integer, DocumentIndexEntry> next() { FieldDocumentIndexEntry die = new FieldDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index)); die.setFieldLengths(fieldLengths.get(index++).toNativeArray()); Entry<Integer, DocumentIndexEntry> e = new MapEntry<Integer, DocumentIndexEntry>(index, die); return e; }
public GISAttributeModel createSubModel(final int[] _idxToRemove) { final TIntArrayList newList = new TIntArrayList(getSize()); final int nb = getSize(); for (int i = 0; i < nb; i++) { if (Arrays.binarySearch(_idxToRemove, i) < 0) { newList.add(list_.get(i)); } } return new GISAttributeModelIntegerList(newList, this); }