List of usage examples for org.apache.commons.math.transform FastFourierTransformer isPowerOf2
public static boolean isPowerOf2(long n)
From source file:ch.slf.FFTRealOneSided.java
public boolean init() { try {//w w w . j a va 2s . c o m fft_size = getPredicateValueAsIntWithException("window-size"); fft = new FastFourierTransformer(); if (!FastFourierTransformer.isPowerOf2(fft_size)) { logger.error("The window size >" + fft_size + "< is not a power of 2."); return false; } } catch (Exception e) { logger.error(e.getMessage(), e); return false; } return true; }