本文整理汇总了Java中it.unimi.dsi.fastutil.ints.IntListIterator类的典型用法代码示例。如果您正苦于以下问题:Java IntListIterator类的具体用法?Java IntListIterator怎么用?Java IntListIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntListIterator类属于it.unimi.dsi.fastutil.ints包,在下文中一共展示了IntListIterator类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: decode
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
@Override
public void decode(Input reader, String text, String key, int count, int[] propertySetMapping, IntArrayList psets, Int2ReferenceOpenHashMap<? extends StoreRef> refs) {
int numEntries = reader.readVarInt(true);
StringRef[] entries = new StringRef[numEntries];
//Read dictionary
/*int[] lens = new int[numEntries];
for (int i = 0; i < numEntries; i++)
lens[i] = reader.readPosVarInt();*/
for(int i = 0; i < numEntries; i++)
entries[i] = new StringRef(reader.readString());//reader.readRawString(lens[i]));
IntListIterator noderange = psets.iterator();
while (noderange.hasNext()) {
int psetid = noderange.nextInt();
final int start = propertySetMapping[psetid];
final int end = propertySetMapping[psetid + 1];
for (int i = start; i < end; i++) {
refs.get(i).get().putProperty(key, entries[reader.readVarInt(true)]);
}
}
}
开发者ID:marcusklang,项目名称:docforia,代码行数:25,代码来源:VariableLenDictStringCodec.java
示例2: decode
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
@Override
public void decode(Input reader, String text, String key, int count, int[] propertySetMapping, IntArrayList psets, Int2ReferenceOpenHashMap<? extends StoreRef> refs) {
int numEntries = reader.readVarInt(true);
//Read dictionary
//int len = reader.readVarInt(true);
StringRef[] entries = new StringRef[numEntries];
for(int i = 0; i < numEntries; i++)
entries[i] = new StringRef(reader.readString());
IntListIterator noderange = psets.iterator();
while (noderange.hasNext()) {
int psetid = noderange.nextInt();
final int start = propertySetMapping[psetid];
final int end = propertySetMapping[psetid + 1];
for (int i = start; i < end; i++) {
refs.get(i).get().putProperty(key, entries[reader.readVarInt(true)]);
}
}
}
开发者ID:marcusklang,项目名称:docforia,代码行数:22,代码来源:EqualLenDictStringCodec.java
示例3: iterator
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
@Override
public Iterator<String> iterator() {
return new Iterator<String>() {
private final IntListIterator valuesIt = values.iterator();
@Override
public boolean hasNext() {
return valuesIt.hasNext();
}
@Override
public String next() {
return lookupTable.get(valuesIt.next());
}
};
}
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:18,代码来源:CategoryColumn.java
示例4: decode
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
@Override
public void decode(Input reader, String text, String key, int count, int[] propertySetMapping, IntArrayList psets, Int2ReferenceOpenHashMap<? extends StoreRef> refs) {
IntListIterator noderange = psets.iterator();
int k = 0;
while (noderange.hasNext()) {
int psetid = noderange.nextInt();
final int start = propertySetMapping[psetid];
final int end = propertySetMapping[psetid + 1];
for (int i = start; i < end; i++, k++) {
refs.get(i).get().putProperty(key, reader.readString());
}
}
}
开发者ID:marcusklang,项目名称:docforia,代码行数:15,代码来源:BaselineStringCodec.java
示例5: decode
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
@Override
public void decode(Input reader, String text, String key, int count, int[] propertySetMapping, IntArrayList psets, Int2ReferenceOpenHashMap<? extends StoreRef> refs) {
//int len = reader.readPosVarInt();
IntListIterator noderange = psets.iterator();
while (noderange.hasNext()) {
int psetid = noderange.nextInt();
final int start = propertySetMapping[psetid];
final int end = propertySetMapping[psetid + 1];
for (int i = start; i < end; i++) {
refs.get(i).get().putProperty(key, reader.readString());
}
}
}
开发者ID:marcusklang,项目名称:docforia,代码行数:16,代码来源:EqualLenStringCodec.java
示例6: scalarProduct
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
/** Returns the modulo-2 scalar product of the two provided bit vectors.
*
* @return the modulo-2 scalar product of {@code e} and {code f}.
*/
public static long scalarProduct(final Modulo2Equation e, long[] solution) {
long sum = 0;
for(final IntListIterator iterator = e.variables.iterator(); iterator.hasNext();)
sum ^= solution[iterator.nextInt()];
return sum;
}
开发者ID:vigna,项目名称:Sux4J,代码行数:11,代码来源:Modulo2SparseSystem.java
示例7: check
import it.unimi.dsi.fastutil.ints.IntListIterator; //导入依赖的package包/类
public boolean check(final long solution[]) {
for(final Modulo2Equation equation: equations) {
int sum = 0;
for(final IntListIterator i = equation.variables.iterator(); i.hasNext();) {
final int e = i.nextInt();
sum ^= solution[e];
}
if (equation.c != sum) {
System.err.println(equation + " " + Arrays.toString(solution));
return false;
}
}
return true;
}
开发者ID:vigna,项目名称:Sux4J,代码行数:15,代码来源:Modulo2SparseSystem.java
注:本文中的it.unimi.dsi.fastutil.ints.IntListIterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论