当前位置: 首页>>代码示例>>Java>>正文


Java IntIterator.nextInt方法代码示例

本文整理汇总了Java中it.unimi.dsi.fastutil.ints.IntIterator.nextInt方法的典型用法代码示例。如果您正苦于以下问题:Java IntIterator.nextInt方法的具体用法?Java IntIterator.nextInt怎么用?Java IntIterator.nextInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在it.unimi.dsi.fastutil.ints.IntIterator的用法示例。


在下文中一共展示了IntIterator.nextInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMinClock

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
/**
 * Get min clock of this row, remove clocks of tasks which would never update this row.
 * 
 * @return min clock value
 */
public int getMinClock() {
  if (clocks.size() == 0) {
    return 0;
  }

  IntIterator iter = clocks.values().iterator();
  int min = Integer.MAX_VALUE;
  while (iter.hasNext()) {
    int clock = iter.nextInt();
    if (clock < min) {
      min = clock;
    }
  }
  return min;
}
 
开发者ID:Tencent,项目名称:angel,代码行数:21,代码来源:RowUpdateInfo.java

示例2: listRowIds

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public String listRowIds() {
  int[] idList = new int[rowIdSet.size()];
  IntIterator iter = rowIdSet.iterator();
  int i = 0;
  while (iter.hasNext()) {
    idList[i++] = iter.nextInt();
  }

  Arrays.sort(idList);

  StringBuilder sb = new StringBuilder();
  for (i = 0; i < idList.length; i++) {
    sb.append(idList[i]);
    sb.append(",");
  }

  return sb.toString();
}
 
开发者ID:Tencent,项目名称:angel,代码行数:19,代码来源:RowIndex.java

示例3: createLocalsChange

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
private DebugLocalsChange createLocalsChange(
    Int2ReferenceMap<DebugLocalInfo> ending, Int2ReferenceMap<DebugLocalInfo> starting) {
  if (ending.isEmpty() && starting.isEmpty()) {
    return null;
  }
  if (ending.isEmpty() || starting.isEmpty()) {
    return new DebugLocalsChange(ending, starting);
  }
  IntSet unneeded = new IntArraySet(Math.min(ending.size(), starting.size()));
  for (Entry<DebugLocalInfo> entry : ending.int2ReferenceEntrySet()) {
    if (starting.get(entry.getIntKey()) == entry.getValue()) {
      unneeded.add(entry.getIntKey());
    }
  }
  if (unneeded.size() == ending.size() && unneeded.size() == starting.size()) {
    return null;
  }
  IntIterator iterator = unneeded.iterator();
  while (iterator.hasNext()) {
    int key = iterator.nextInt();
    ending.remove(key);
    starting.remove(key);
  }
  return new DebugLocalsChange(ending, starting);
}
 
开发者ID:inferjay,项目名称:r8,代码行数:26,代码来源:LinearScanRegisterAllocator.java

示例4: intersectionPE

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public boolean intersectionPE(CustomHashMap other){
boolean modified = false;

IntIterator itr = this.keySet().iterator();
while(itr.hasNext()){
    int key = itr.nextInt();
    int keyInv = 0 - key;
    if(!other.containsKey(key) && !other.containsKey(keyInv)){
	itr.remove();
	modified = true;
    }
}

for(int otherKey : other.keySet()){
    int otherKeyInv = 0-otherKey;
    boolean intst = this.containsKey(otherKey); //does this contain otherKey?
    boolean intstPrime = this.containsKey(otherKeyInv); //does this contain -(otherkey)?
    
    if(!intst && intstPrime){
	this.put(otherKey, other.get(otherKey));
	modified = true;
    }
}
return modified;
   }
 
开发者ID:Kingsford-Group,项目名称:kourami,代码行数:26,代码来源:CustomHashMap.java

示例5: createNewAttribute

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public Attribute createNewAttribute(HashMap<String, Attribute> attributes,
           String attribute, int noMonths) {
    Attribute a = attributes.get(attribute);
       int ct = 0;
       IntSet keys = a.data.keySet();
       IntIterator it = keys.iterator();
       ArrayList<SpatioTemporalVal> arr = new ArrayList<SpatioTemporalVal>();
       while(ct < noMonths) {
           if(!it.hasNext()) {
               Utilities.er("no. of months is greater than what is present");
           }
           int month = it.nextInt();
           arr.addAll(a.data.get(month));
           ct++;
       }
       Collections.sort(arr);
       Attribute na = new Attribute();
       na.data.put(0, arr);
       na.nodeSet = a.nodeSet;
       return na;
}
 
开发者ID:ViDA-NYU,项目名称:data-polygamy,代码行数:22,代码来源:StandaloneExp.java

示例6: getWriteDeltaOffset

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
/**
 * Estimates the number of bits required for the succinct delta representation from strictly incremental
 * <code>list</code>. For details of the representation (see
 * {@link org.pebble.core.encoding.OutputSuccinctStream#writeDelta(it.unimi.dsi.fastutil.ints.IntList, int) writeDelta}).
 * @param list to encode. List must be strictly incremental with positives (including zero) values.
 * @param valueBitSize fixed number of bits used to represent value in list to be encoded. It can be any value
 *                     between 1bit and 31 bits.
 * @return number of representation bits.
 */
public int getWriteDeltaOffset(final IntList list, final int valueBitSize) {
    final IntIterator listIterator = list.iterator();
    int offset = getWriteDeltaOffset(list.size());
    if (listIterator.hasNext()) {
        int value;
        int deltaValue;
        int lastValue = listIterator.nextInt();
        offset += writeIntOffset(lastValue, valueBitSize);
        while (listIterator.hasNext()) {
            value = listIterator.nextInt();
            deltaValue = value - lastValue - 1;
            offset += getWriteDeltaOffset(deltaValue);
            lastValue = value;
        }
    }
    return offset;
}
 
开发者ID:groupon,项目名称:pebble,代码行数:27,代码来源:IntOutputOffset.java

示例7: findNewRows

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
private RowIndex findNewRows(RowIndex rowIndex) {
  IntOpenHashSet need = new IntOpenHashSet();
  IntOpenHashSet fetchingRowIds = fetchingRowSets.get(rowIndex.getMatrixId());

  IntIterator iter = rowIndex.getRowIds().iterator();
  while (iter.hasNext()) {
    int rowId = iter.nextInt();
    if (!fetchingRowIds.contains(rowId)) {
      need.add(rowId);
      fetchingRowIds.add(rowId);
    }
  }

  return new RowIndex(rowIndex.getMatrixId(), need, rowIndex);
}
 
开发者ID:Tencent,项目名称:angel,代码行数:16,代码来源:MatrixClientAdapter.java

示例8: intersectReferenced

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
void intersectReferenced(final IntSet attributes, final Attribute[] attributeIndex) {
  final IntIterator referencedIterator = referenced.iterator();
  while (referencedIterator.hasNext()) {
    final int ref = referencedIterator.nextInt();
    if (attributes.contains(ref)) {
      continue;
    }

    referencedIterator.remove();
    attributeIndex[ref].removeDependent(id);
  }
}
 
开发者ID:HPI-Information-Systems,项目名称:AdvancedDataProfilingSeminar,代码行数:13,代码来源:Attribute.java

示例9: intersection

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public boolean intersection(CustomHashMap other){
boolean modified = false;
IntIterator itr = this.keySet().iterator();
while(itr.hasNext()){
    int curInt = itr.nextInt();
    if(!other.containsKey(curInt)){
	itr.remove();
	modified = false;
    }
}
return modified;
   }
 
开发者ID:Kingsford-Group,项目名称:kourami,代码行数:13,代码来源:CustomHashMap.java

示例10: nonZeroElements

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public int nonZeroElements() {
    int res = 0;
    IntIterator rowIter = indexesMap().keySet().iterator();

    while (rowIter.hasNext()) {
        int row = rowIter.nextInt();
        res += indexesMap().get(row).size();
    }

    return res;
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:13,代码来源:SparseLocalOnHeapMatrix.java

示例11: getUsers

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
@Nonnull
public int[] getUsers() {
    final int size = rows.size();
    final int[] keys = new int[size];
    final IntIterator itor = rows.keySet().iterator();
    for (int i = 0; i < size; i++) {
        if (!itor.hasNext()) {
            throw new IllegalStateException();
        }
        int key = itor.nextInt();
        keys[i] = key;
    }
    return keys;
}
 
开发者ID:apache,项目名称:incubator-hivemall,代码行数:15,代码来源:PositiveOnlyFeedback.java

示例12: selectIf

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public TimeColumn selectIf(LocalTimePredicate predicate) {
    TimeColumn column = emptyCopy();
    IntIterator iterator = intIterator();
    while (iterator.hasNext()) {
        int next = iterator.nextInt();
        if (predicate.test(PackedLocalTime.asLocalTime(next))) {
            column.appendInternal(next);
        }
    }
    return column;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:12,代码来源:TimeColumn.java

示例13: isEqualTo

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
/**
 * Returns a bitmap flagging the records for which the value in this column is equal to the value in the given
 * column
 * Columnwise isEqualTo.
 */
public Selection isEqualTo(TimeColumn column) {
    Selection results = new BitmapBackedSelection();
    int i = 0;
    IntIterator intIterator = column.intIterator();
    for (int next : data) {
        if (next == intIterator.nextInt()) {
            results.add(i);
        }
        i++;
    }
    return results;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:18,代码来源:TimeColumn.java

示例14: isEqualTo

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
/**
 * Returns a bitmap flagging the records for which the value in this column is equal to the value in the given
 * column
 * Columnwise isEqualTo.
 */
public Selection isEqualTo(DateColumn column) {
    Selection results = new BitmapBackedSelection();
    int i = 0;
    IntIterator intIterator = column.intIterator();
    for (int next : data) {
        if (next == intIterator.nextInt()) {
            results.add(i);
        }
        i++;
    }
    return results;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:18,代码来源:DateColumn.java

示例15: selectIf

import it.unimi.dsi.fastutil.ints.IntIterator; //导入方法依赖的package包/类
public DateColumn selectIf(LocalDatePredicate predicate) {
    DateColumn column = emptyCopy();
    IntIterator iterator = intIterator();
    while (iterator.hasNext()) {
        int next = iterator.nextInt();
        if (predicate.test(PackedLocalDate.asLocalDate(next))) {
            column.appendInternal(next);
        }
    }
    return column;
}
 
开发者ID:jtablesaw,项目名称:tablesaw,代码行数:12,代码来源:DateColumn.java


注:本文中的it.unimi.dsi.fastutil.ints.IntIterator.nextInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。