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


Java BooleanArrays类代码示例

本文整理汇总了Java中it.unimi.dsi.fastutil.booleans.BooleanArrays的典型用法代码示例。如果您正苦于以下问题:Java BooleanArrays类的具体用法?Java BooleanArrays怎么用?Java BooleanArrays使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BooleanArrays类属于it.unimi.dsi.fastutil.booleans包,在下文中一共展示了BooleanArrays类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import it.unimi.dsi.fastutil.booleans.BooleanArrays; //导入依赖的package包/类
/** Initialises the approximator, providing a new seed to the underlying {@link HyperLogLogCounterArray}.
 * 
 * <p>This method must be call before a series of {@linkplain #iterate() iterations}.
 * @param seed passed to {@link #clear(long)}.
 */
public void init( final long seed ) {
	ensureOpen();
	info( "Clearing all registers..." );
	clear( seed );

	// We load the counter i with node i.
	for( int i = numNodes; i-- != 0; ) add( i, i );

	iteration = -1;
	completed = systolic = local = preLocal = false;
	
	if ( ! external ) for( long[] a: resultBits ) LongArrays.fill( a, 0 );
	
	if ( sumOfDistances != null ) Arrays.fill( sumOfDistances, 0 );
	if ( sumOfInverseDistances != null ) Arrays.fill( sumOfInverseDistances, 0 );
	for ( int i = 0; i < discountFunction.length; i++ ) Arrays.fill( discountedCentrality[ i ], 0 );
	
	// The initial value (the iteration for this value does not actually happen).
	neighbourhoodFunction.add( last = numNodes );

	BooleanArrays.fill( modifiedCounter, true ); // Initially, all counters are modified.
	
	if ( pl != null ) {
		pl.displayFreeMemory = true;
		pl.itemsName = "iterates";
		pl.start( "Iterating..." );
	}
}
 
开发者ID:lhelwerd,项目名称:WebGraph,代码行数:34,代码来源:HyperBall.java

示例2: clear

import it.unimi.dsi.fastutil.booleans.BooleanArrays; //导入依赖的package包/类
public void clear() {
 if ( size == 0 ) return;
 size = 0;
 BooleanArrays.fill( used, false );
 // We null all object entries so that the garbage collector can do its work.
}
 
开发者ID:kkrugler,项目名称:yalder,代码行数:7,代码来源:Int2IntOpenHashMap.java


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