本文整理汇总了Java中it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap类的典型用法代码示例。如果您正苦于以下问题:Java Short2ShortOpenHashMap类的具体用法?Java Short2ShortOpenHashMap怎么用?Java Short2ShortOpenHashMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Short2ShortOpenHashMap类属于it.unimi.dsi.fastutil.shorts包,在下文中一共展示了Short2ShortOpenHashMap类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VisitState
import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; //导入依赖的package包/类
/** Creates a visit state.
*
* @param frontier the frontier for which the state is being created.
* @param schemeAuthority the scheme+authority of this {@link VisitState}.
*/
public VisitState(final Frontier frontier, final byte[] schemeAuthority) {
this.frontier = frontier;
this.schemeAuthority = schemeAuthority;
cookies = EMPTY_COOKIE_ARRAY;
pathQueries = new ObjectArrayFIFOQueue<>();
termCount = frontier != null && frontier.rc.spamDetector == null ? null : new Short2ShortOpenHashMap();
spammicity = -1;
}
示例2: updateTermCount
import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; //导入依赖的package包/类
public void updateTermCount(final Short2ShortMap termCount) {
termCountUpdates++;
// In case we have an open hash map, we use the fast iterator to reduce object creation.
if (termCount instanceof Short2ShortOpenHashMap)
for(ObjectIterator<Short2ShortMap.Entry> fastIterator = ((Short2ShortOpenHashMap)termCount).short2ShortEntrySet().fastIterator(); fastIterator.hasNext();)
updateTermCountEntry(fastIterator.next());
else for(Short2ShortMap.Entry e : termCount.short2ShortEntrySet()) updateTermCountEntry(e);
}
示例3: asSnapshot
import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; //导入依赖的package包/类
private ChunkSectionSnapshot asSnapshot(boolean skylight) {
final Short2ShortMap typeCounts = new Short2ShortOpenHashMap(this.typesCountMap);
final int count = this.types.length - this.nonAirCount;
if (count > 0) {
typeCounts.put((short) 0, (short) count);
}
return new ChunkSectionSnapshot(this.types.clone(), typeCounts, new Short2ObjectOpenHashMap<>(this.tileEntities),
this.lightFromBlock.getPackedArray(), skylight ? this.lightFromSky.getPackedArray() : null);
}
示例4: ChunkBag
import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; //导入依赖的package包/类
ChunkBag(final int size)
{
this.changes = new Short2ShortOpenHashMap(size);
}