本文整理了Java中gnu.trove.TIntArrayList.toNativeArray()
方法的一些代码示例,展示了TIntArrayList.toNativeArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TIntArrayList.toNativeArray()
方法的具体详情如下:
包路径:gnu.trove.TIntArrayList
类名称:TIntArrayList
方法名:toNativeArray
[英]See gnu.trove.list.array.TIntArrayList#toArray()
[中]见gnu。宝藏。列表大堆TIntArrayList#toArray()
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
/**
* @param _init les valeurs initiales
*/
public CtuluListInteger(final TIntArrayList _init) {
this(_init.toNativeArray());
}
代码示例来源:origin: org.terrier/terrier-core
/** Returns the indices of the terms that are considered (i.e. scored) during matching */
public int[] getMatchingTerms()
{
return matchOnTerms.toNativeArray();
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
/**
* @return le tableau des indices
*/
public int[] getArray() {
return list_.toNativeArray();
}
代码示例来源:origin: de.julielab/jcore-mallet-0.4
/**
* Copies the contents of the list into a native array.
*
* @return an <code>int[]</code> value
*/
public int[] toNativeArray() {
return toNativeArray(0, _pos);
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
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;
}
代码示例来源:origin: terrier-org/terrier-core
/** Returns the indices of the terms that are considered (i.e. scored) during matching */
public int[] getMatchingTerms()
{
return matchOnTerms.toNativeArray();
}
代码示例来源:origin: terrier-org/terrier-core
/** 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();
}
代码示例来源:origin: de.julielab/jcore-mallet-2.0.9
private void writeObject (ObjectOutputStream out) throws IOException
{
out.defaultWriteObject ();
out.writeInt (CURRENT_SERIAL_VERSION);
out.writeObject (universe);
out.writeObject (included.toNativeArray ());
}
代码示例来源:origin: cc.mallet/mallet
private void writeObject (ObjectOutputStream out) throws IOException
{
out.defaultWriteObject ();
out.writeInt (CURRENT_SERIAL_VERSION);
out.writeObject (universe);
out.writeObject (included.toNativeArray ());
}
代码示例来源:origin: com.github.steveash.mallet/mallet
private void writeObject (ObjectOutputStream out) throws IOException
{
out.defaultWriteObject ();
out.writeInt (CURRENT_SERIAL_VERSION);
out.writeObject (universe);
out.writeObject (included.toNativeArray ());
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
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();
}
代码示例来源:origin: terrier-org/terrier-core
/** {@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();
}
代码示例来源:origin: net.sourceforge.mstparser/mstparser
public int[] keys() {
TIntArrayList keys = new TIntArrayList();
addKeysToList(keys);
return keys.toNativeArray();
}
代码示例来源:origin: de.julielab/jcore-mallet-0.4
/**
* 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;
}
}
代码示例来源:origin: terrier-org/terrier-core
@Override
public WritablePosting asWritablePosting() {
return positions != null
? new BlockPostingImpl(currentId, frequency, positions.toNativeArray())
: new BasicPostingImpl(currentId, frequency);
}
代码示例来源:origin: org.terrier/terrier-core
@Override
public WritablePosting asWritablePosting() {
return positions != null
? new BlockPostingImpl(currentId, frequency, positions.toNativeArray())
: new BasicPostingImpl(currentId, frequency);
}
代码示例来源:origin: terrier-org/terrier-core
public DocumentIndexEntry next() {
FieldDocumentIndexEntry die = new FieldDocumentIndexEntry();
die.setDocumentLength(docLengths.get(index));
die.setFieldLengths(fieldLengths.get(index++).toNativeArray());
return die;
}
代码示例来源:origin: org.terrier/terrier-core
/** 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();
}
代码示例来源:origin: com.github.steveash.mallet/mallet
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 ();
}
代码示例来源:origin: cc.mallet/mallet
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 ();
}
内容来源于网络,如有侵权,请联系作者删除!