#include "fftservintf.h" /* --Methode-- */ FFTServerInterface::FFTServerInterface(string info) { _info = info; _fgnorm = false; } /* --Methode-- */ FFTServerInterface::~FFTServerInterface() { } /* --Methode-- */ void FFTServerInterface::FFTForward(TVector< complex > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TVector...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TVector< complex > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTBackward(TVector...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TVector< r_8 > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TVector...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TVector< complex > const &, TVector< r_8 > &) { throw ForbiddenError("FFTServer::FFTBackward(TVector...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TMatrix< complex > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TMatrix...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TMatrix< complex > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTBackward(TMatrix...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TMatrix< r_8 > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TMatrix...) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TMatrix< complex > const &, TMatrix< r_8 > &) { throw ForbiddenError("FFTServer::FFTBackward(TMatrix...) Unsupported operation !"); } // ----------------- Transforme pour les float ------------------- /* --Methode-- */ void FFTServerInterface::FFTForward(TVector< complex > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TVector r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TVector< complex > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTBackward(TVector r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TVector< r_4 > const &, TVector< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TVector r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TVector< complex > const &, TVector< r_4 > &) { throw ForbiddenError("FFTServer::FFTBackward(TVector r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TMatrix< complex > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TMatrix r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TMatrix< complex > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTBackward(TMatrix r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTForward(TMatrix< r_4 > const &, TMatrix< complex > &) { throw ForbiddenError("FFTServer::FFTForward(TMatrix r_4 ... ) Unsupported operation !"); } /* --Methode-- */ void FFTServerInterface::FFTBackward(TMatrix< complex > const &, TMatrix< r_4 > &) { throw ForbiddenError("FFTServer::FFTBackward(TMatrix r_4 ... ) Unsupported operation !"); } // Methodes pour reordonner les donnees /* --Methode-- */ void FFTServerInterface::ReShapetoReal( TVector< complex > const & in, TVector< r_8 > & out) { int N = in.NElts(); out.ReSize(in.NElts()*2); out(0) = in(0).real(); if (in(in.NElts()-1).imag() == 0) { for(int i=1; i > const & in, TVector< r_4 > & out) { int N = in.NElts(); out.ReSize(in.NElts()*2); out(0) = in(0).real(); if (in(in.NElts()-1).imag() == 0) { for(int i=1; i const & in, TVector< complex > & out) { int N = in.NElts(); out.ReSize(N/2+1); out(0) = complex (in(0),0.); if(in.NElts()%2 !=0) { for(int k=1;k<=N/2+1;k++) { out(k) = complex (in(k),in(N-k)); } } else { for(int k=1;k (in(k),in(N-k)); } out(N/2) = complex (in(N/2),0.); } } /* --Methode-- */ void FFTServerInterface::ReShapetoCompl(TVector< r_4 > const & in, TVector< complex > & out) { int N = in.NElts(); out.ReSize(N/2+1); out(0) = complex (in(0),0.); if(in.NElts()%2 !=0) { for(int k=1;k<=N/2+1;k++) { out(k) = complex (in(k),in(N-k)); } } else { for(int k=1;k (in(k),in(N-k)); } out(N/2) = complex (in(N/2),0.); } }