math.fourierTransforms.interleaved
Class Factorize

java.lang.Object
  extended by math.fourierTransforms.interleaved.Factorize

public class Factorize
extends java.lang.Object

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

Author:
Bruce R. Miller bruce.miller@nist.gov, Contribution of the National Institute of Standards and Technology,, not subject to copyright., Derived from GSL (Gnu Scientific Library), GSL's FFT Code by Brian Gough bjg@vvv.lanl.gov, Since GSL is released under, GPL,, this package must also be.

Constructor Summary
Factorize()
           
 
Method Summary
static int[] factor(int n, int[] fromfactors)
          Return the prime factors of n.
static int log2(int n)
          Return the integer log, base 2, of n, or -1 if n is not an integral power of 2.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factorize

public Factorize()
Method Detail

factor

public static int[] factor(int n,
                           int[] fromfactors)
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.


log2

public static int log2(int n)
Return the integer log, base 2, of n, or -1 if n is not an integral power of 2.