org.das2.math.fft.jnt.Factorize

Supplies static methods for factoring integers needed by various FFT classes.

Factorize( )


factor

factor( int n, int[] fromfactors ) → int[]

Return the prime factors of n. The method first extracts any factors in fromfactors, in order (which needn't actually be prime). Remaining factors in increasing order follow.

Parameters

n - an int
fromfactors - an int[]

Returns:

int[]

[search for examples] [view on GitHub] [view on old javadoc] [view source]


log2

log2( int n ) → int

Return the integer log, base 2, of n, or -1 if n is not an integral power of 2.

Parameters

n - an int

Returns:

int

[search for examples] [view on GitHub] [view on old javadoc] [view source]