/*! \file cxxfftwtest.cc * \brief a small test program for fftw when called from C++ * * ---------------------------------------------------------------------------- * * $Id$ * \author Thomas Forbriger * \date 12/09/2007 * * a small test program for fftw when called from C++ * * Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach) * * ---- * libfourier is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * ---- * * REVISIONS and CHANGES * - 12/09/2007 V1.0 Thomas Forbriger * - 07/10/2010 V1.1 just activated this code * * ============================================================================ */ #define CXXFFTWTEST_VERSION \ "CXXFFTWTEST V1.1 a small test program for fftw when called from C++" #define CXXFFTWTEST_CVSID \ "$Id$" #include #include #include #include using std::cout; using std::cerr; using std::endl; using namespace fourier::fft; typedef DRFFTWAFF::Tseries Tseries; typedef DRFFTWAFF::Tspectrum Tspectrum; void fill(Tseries& a, int n, int m) { a=Tseries(n); int k; double f1, f2; f1=3.141592653589/n; f2=f1*m*2; /* fill input array */ for (k=0; k0, "illegal number of samples") FOURIER_assert(opt.m>0, "illegal frequency") process(opt.n, opt.m, opt.verbose, opt.debug); } /* ----- END OF cxxfftwtest.cc ----- */