/** * @param _init les valeurs initiales */ public CtuluListInteger(final TIntArrayList _init) { this(_init.toNativeArray()); }
/** Returns the indices of the terms that are considered (i.e. scored) during matching */ public int[] getMatchingTerms() { return matchOnTerms.toNativeArray(); }
/** * @return le tableau des indices */ public int[] getArray() { return list_.toNativeArray(); }
/** * Copies the contents of the list into a native array. * * @return an <code>int[]</code> value */ public int[] toNativeArray() { return toNativeArray(0, _pos); }
public static int[][] toArray(final TIntArrayList[] _intArrays) { final int[][] res = new int[_intArrays.length][]; for (int i = res.length - 1; i >= 0; i--) { res[i] = _intArrays[i].toNativeArray(); } return res; }
/** Returns the indices of the terms that are considered (i.e. scored) during matching */ public int[] getMatchingTerms() { return matchOnTerms.toNativeArray(); }
/** Returns the indices of the terms that must be called through assignScore() but not actually used to match documents. */ public int[] getNonMatchingTerms() { return nonMatchOnTerms.toNativeArray(); }
private void writeObject (ObjectOutputStream out) throws IOException { out.defaultWriteObject (); out.writeInt (CURRENT_SERIAL_VERSION); out.writeObject (universe); out.writeObject (included.toNativeArray ()); }
private void writeObject (ObjectOutputStream out) throws IOException { out.defaultWriteObject (); out.writeInt (CURRENT_SERIAL_VERSION); out.writeObject (universe); out.writeObject (included.toNativeArray ()); }
private void writeObject (ObjectOutputStream out) throws IOException { out.defaultWriteObject (); out.writeInt (CURRENT_SERIAL_VERSION); out.writeObject (universe); out.writeObject (included.toNativeArray ()); }
public static int[] getSelectedIdx(final BitSet _set) { if (_set == null || _set.isEmpty()) { return FuEmptyArrays.INT0; } final int max = _set.length(); final TIntArrayList list = new TIntArrayList(max); for (int i = 0; i < max; i++) { if (_set.get(i)) { list.add(i); } } return list.toNativeArray(); }
/** {@inheritDoc} */ public int[] getFieldLengths(int docid) { if (!fieldLengths.contains(docid)) { System.err.println("Memory Document index does not contain lengths for doc "+docid); return new int[2]; } return fieldLengths.get(docid).toNativeArray(); }
public int[] keys() { TIntArrayList keys = new TIntArrayList(); addKeysToList(keys); return keys.toNativeArray(); }
/** * Sheds any excess capacity above and beyond the current size of * the list. */ public void trimToSize() { if (_data.length > size()) { int[] tmp = new int[size()]; toNativeArray(tmp, 0, tmp.length); _data = tmp; } }
@Override public WritablePosting asWritablePosting() { return positions != null ? new BlockPostingImpl(currentId, frequency, positions.toNativeArray()) : new BasicPostingImpl(currentId, frequency); }
@Override public WritablePosting asWritablePosting() { return positions != null ? new BlockPostingImpl(currentId, frequency, positions.toNativeArray()) : new BasicPostingImpl(currentId, frequency); }
public DocumentIndexEntry next() { FieldDocumentIndexEntry die = new FieldDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index)); die.setFieldLengths(fieldLengths.get(index++).toNativeArray()); return die; }
/** Get an array of all the ids in a given IterablePosting stream */ public static int[] getIds(final IterablePosting ip) throws IOException { final TIntArrayList ids = new TIntArrayList(); while(ip.next() != IterablePosting.EOL) ids.add(ip.getId()); return ids.toNativeArray(); }
private int[] toValueArray () { TIntArrayList vals = new TIntArrayList (maxTime () * numSlices ()); for (int t = 0; t < lblseq.size (); t++) { Labels lbls = lblseq.getLabels (t); for (int j = 0; j < lbls.size (); j++) { Label lbl = lbls.get (j); vals.add (lbl.getIndex ()); } } return vals.toNativeArray (); }
private int[] toValueArray () { TIntArrayList vals = new TIntArrayList (maxTime () * numSlices ()); for (int t = 0; t < lblseq.size (); t++) { Labels lbls = lblseq.getLabels (t); for (int j = 0; j < lbls.size (); j++) { Label lbl = lbls.get (j); vals.add (lbl.getIndex ()); } } return vals.toNativeArray (); }