當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。