Commit 568052e6 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

test of array engine is successfull

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libfourier
SVN Revision: 3955
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent cc65926d
......@@ -37,10 +37,12 @@
#define TF_FFTWAFFAR_CC_CVSID \
"$Id$"
#include <iostream>
#include <fourier/fftwaffar.h>
#include <fourier/error.h>
#include <aff/Carray.h>
#include <aff/slice.h>
#include <aff/shaper.h>
namespace fourier {
......@@ -48,8 +50,8 @@ namespace fourier {
DRFFTWAFFArrayEngine::DRFFTWAFFArrayEngine(const int& nseis,
const int& nsamp)
: Mseriesarray(TAseries(nsamp,nseis)),
Mspectrumarray(TAspectrum(DRFFTWAFFArrayEngine::ncoeff(nsamp),nseis)),
: Mseriesarray(TAseries(aff::Shaper(0,nsamp-1)(0,nseis-1))),
Mspectrumarray(TAspectrum(aff::Shaper(0,DRFFTWAFFArrayEngine::ncoeff(nsamp)-1)(0,nseis-1))),
Mplanr2c(0), Mplanc2r(0)
{
this->checkconsistency();
......@@ -110,11 +112,11 @@ namespace fourier {
void DRFFTWAFFArrayEngine::checkconsistency()
{
FOURIER_assert(Mseriesarray.size(0)==Mspectrumarray.size(0),
"ERROR: inconsistent number of signals");
FOURIER_assert(Mseriesarray.size(1)==
DRFFTWAFFArrayEngine::ncoeff(Mspectrumarray.size(1)),
FOURIER_assert(Mspectrumarray.size(0)==
DRFFTWAFFArrayEngine::ncoeff(Mseriesarray.size(0)),
"ERROR: sample size inconsistent");
FOURIER_assert(Mseriesarray.size(1)==Mspectrumarray.size(1),
"ERROR: inconsistent number of signals");
FOURIER_assert(((Mseriesarray.size(2)==1) && (Mspectrumarray.size(2)==1)),
"ERROR: two-dimensional arrays only");
FOURIER_assert(((Mseriesarray.size(3)==1) && (Mspectrumarray.size(3)==1)),
......@@ -254,7 +256,7 @@ namespace fourier {
{
FOURIER_assert(((i>=0) && (i<this->nseries())),
"ERROR: signal index is out of range");
return(aff::slice(Mseriesarray)(1,i));
return(aff::slice(Mseriesarray)()(i));
} // DRFFTWAFFArrayEngine::TAseries DRFFTWAFFArrayEngine::series(i) const
/*----------------------------------------------------------------------*/
......@@ -265,7 +267,7 @@ namespace fourier {
{
FOURIER_assert(((i>=0) && (i<this->nseries())),
"ERROR: signal index is out of range");
return(aff::slice(Mspectrumarray)(1,i));
return(aff::slice(Mspectrumarray)()(i));
} // DRFFTWAFFArrayEngine::TAspectrum DRFFTWAFFArrayEngine::spectrum(i) const
} // namespace fft
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment