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


Java Short2ShortOpenHashMap类代码示例

本文整理汇总了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;
}
 
开发者ID:LAW-Unimi,项目名称:BUbiNG,代码行数:14,代码来源:VisitState.java

示例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);
}
 
开发者ID:LAW-Unimi,项目名称:BUbiNG,代码行数:9,代码来源:VisitState.java

示例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);
}
 
开发者ID:LanternPowered,项目名称:LanternServer,代码行数:10,代码来源:LanternChunk.java

示例4: ChunkBag

import it.unimi.dsi.fastutil.shorts.Short2ShortOpenHashMap; //导入依赖的package包/类
ChunkBag(final int size)
{
    this.changes = new Short2ShortOpenHashMap(size);
}
 
开发者ID:Diorite,项目名称:Diorite-old,代码行数:5,代码来源:SimpleBlockBag.java


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