it.unimi.dsi.fastutil.ints.IntSet.contains()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中it.unimi.dsi.fastutil.ints.IntSet.contains()方法的一些代码示例,展示了IntSet.contains()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IntSet.contains()方法的具体详情如下:
包路径:it.unimi.dsi.fastutil.ints.IntSet
类名称:IntSet
方法名:contains

IntSet.contains介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-pinot

@Override
 public boolean applySV(int value) {
  return _matchingValues.contains(value);
 }
}

代码示例来源:origin: apache/incubator-pinot

@Override
 public boolean applySV(int value) {
  return !_nonMatchingValues.contains(value);
 }
}

代码示例来源:origin: apache/incubator-pinot

@Override
public boolean applySV(int dictId) {
 return !_nonMatchingDictIdSet.contains(dictId);
}

代码示例来源:origin: apache/incubator-pinot

@Override
public boolean applySV(int dictId) {
 return _matchingDictIdSet.contains(dictId);
}

代码示例来源:origin: apache/incubator-pinot

@Override
public boolean applySV(int dictId) {
 return _matchingDictIdSet.contains(dictId);
}

代码示例来源:origin: apache/incubator-pinot

@Override
public int[] getMatchingDictIds() {
 if (_matchingDictIds == null) {
  int dictionarySize = _dictionary.length();
  _matchingDictIds = new int[dictionarySize - _numNonMatchingDictIds];
  int index = 0;
  for (int dictId = 0; dictId < dictionarySize; dictId++) {
   if (!_nonMatchingDictIdSet.contains(dictId)) {
    _matchingDictIds[index++] = dictId;
   }
  }
 }
 return _matchingDictIds;
}

代码示例来源:origin: apache/incubator-pinot

private static int[] filterInts(IntSet intSet, int[] source) {
 IntList intList = new IntArrayList();
 for (int value : source) {
  if (intSet.contains(value)) {
   intList.add(value);
  }
 }
 if (intList.size() == source.length) {
  return source;
 } else {
  return intList.toIntArray();
 }
}

代码示例来源:origin: apache/incubator-pinot

while (childrenIterator.hasNext()) {
 StarTreeNode childNode = childrenIterator.next();
 if (matchingDictIds.contains(childNode.getDimensionValue())) {
  queue.add(
    new SearchEntry(childNode, newRemainingPredicateColumns, searchEntry._remainingGroupByColumns));

代码示例来源:origin: apache/incubator-pinot

Assert.assertEquals(inPredicateEvaluator.applySV(value), valueSet.contains(value));
Assert.assertEquals(notInPredicateEvaluator.applySV(value), !valueSet.contains(value));

代码示例来源:origin: prestodb/presto

verify(!pagesToCompact.contains(newPageId));
pagesToCompact.add(newPageId);

代码示例来源:origin: com.senseidb.zoie/zoie-core

public boolean contains(int val) {
 final int h = val * MIXER;
 final long bits = _filter[h & _mask];
 return (bits & (1L << (h >>> 26))) != 0 && (bits & (1L << ((h >> 20) & 0x3F))) != 0
   && _set.contains(val);
}

代码示例来源:origin: senseidb/zoie

public boolean contains(int val) {
 final int h = val * MIXER;
 final long bits = _filter[h & _mask];
 return (bits & (1L << (h >>> 26))) != 0 && (bits & (1L << ((h >> 20) & 0x3F))) != 0
   && _set.contains(val);
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

public boolean contains(int val)
{
 final int h = val * MIXER;
 final long bits = _filter[h & _mask];
 
 return (bits & (1L << (h >>> 26))) != 0 && (bits & (1L << ((h >> 20) & 0x3F))) != 0 && _set.contains(val);
}

代码示例来源:origin: it.unimi.di/mg4j

@Override
  public boolean accept( int from, int to ) {
    return resultSet.contains( from ) && resultSet.contains( to );
  }
} );

代码示例来源:origin: org.apache.giraph/giraph-core

@Override
public boolean contains(IntWritable value) {
 return set.contains(value.get());
}

代码示例来源:origin: it.unimi.dsi/mg4j

@Override
public Document nextDocument() throws IOException {
  Document doc;
  if ( over ) return null;
  do {
    doc = underlyingIterator.nextDocument();
    docPointer++;
  } while ( doc != null && !documents.contains( docPointer ) );
  over = doc == null;
  return doc;
}

代码示例来源:origin: it.unimi.di/mg4j

@Override
public Document nextDocument() throws IOException {
  Document document;
  if ( over ) return null;
  for(;;) {
    document = underlyingIterator.nextDocument();
    docPointer++;
    if ( document != null ) {
      if ( documents.contains( docPointer ) ) break;
      document.close();
    }
    else break;
  }
  over = document == null;
  return document;
}

代码示例来源:origin: ForestryMC/Binnie

public Collection<CustomSlot> getCustomSlots(ContainerCraftGUI container) {
    Collection<CustomSlot> slots = new ArrayList<>();
    if (isItemError()) {
      IntSet slotNumbers = new IntArraySet(getData());
      for (final CustomSlot cslot : container.getCustomSlots()) {
        if (!(cslot.inventory instanceof InventoryPlayer) && slotNumbers.contains(cslot.getSlotIndex())) {
          slots.add(cslot);
        }
      }
    }
    return slots;
  }
}

代码示例来源:origin: padreati/rapaio

/**
 * Builds a new frame only with rows not specified in mapping.
 */
default Frame removeRows(Mapping mapping) {
  IntSet remove = new IntOpenHashSet(mapping.toList());
  IntList map = new IntArrayList(Math.min(0, rowCount() - remove.size()));
  for (int i = 0; i < rowCount(); i++) {
    if (!remove.contains(i)) {
      map.add(i);
    }
  }
  return mapRows(Mapping.wrap(map));
}

代码示例来源:origin: RankSys/RankSys

@Override
public Stream<? extends FMInstance> stream() {
  return uidxs.stream()
      .flatMap(uidx -> {
        IntSet uidxIidxs = new IntOpenHashSet();
        prefs.getUidxIidxs(uidx).forEachRemaining(uidxIidxs::add);
        return seq(rnd.ints(iidxs.size(), 0, iidxs.size()).map(iidxs::getInt))
            .filter(jidx -> !uidxIidxs.contains(jidx))
            .limit(uidxIidxs.size())
            .zip(uidxIidxs)
            .map(t -> getInstance(uidx, t.v2, t.v1))
            .shuffle();
      });
}

相关文章