#include #include #include // for copy #include // for ostream_iterator #ifdef CBLAS #ifdef Darwin #include #elif Linux #include #endif #endif using namespace std; #include "laguerreTransform.h" #include "lagsht_exceptions.h" #define DEBUG 1 namespace LagSHT { LaguerreTransform::LaguerreTransform(int N, r_8 R, int alpha) : BaseLaguerreTransform(N,alpha), R_(R) { #if DEBUG >= 1 cout << "LaguerreTransform start...." < dist(N_); transform(nodes_.begin(),nodes_.end(),dist.begin(), distance(rscaled)); return min_element(dist.begin(),dist.end()) - dist.begin(); }//RadIndex void LaguerreTransform::MultiAnalysis(const vector< complex >& fi, vector< complex >& fn, int stride) { if(fi.size() != (size_t)(N_*stride) ) throw LagSHTError("LagTransform::Analysis size error"); fn.resize(N_*stride); #if DEBUG >= 1 cout << "Analysis with Function...." << endl; #endif #if DEBUG >= 2 std::copy(fi.begin(), fi.end(), std::ostream_iterator(std::cout, " ")); #endif r_8 invalphaFact = 1.0/alphaFact_; //1/alpha! vector facts(N_); //sqrt(n!/(n+alpha)!) en iteratif facts[0] = invalphaFact; for(int n=1;n LnAll(N_); //all the values Lag_n(r) n:0...N-1 vector LnkMtx(N_*N_); //all the values Lag_n(r) n:0...N-1 TRY r_16->r_8 for (int k=0; k > vtmp(N_); for (int l=0; l fli = fi[l+ i*stride]; r_8 wi = weights_[i]; for (int n=0; n >& fn, vector< complex >& fi, int stride) { if(fn.size() != (size_t)(N_*stride) ) throw LagSHTError("LagTransform::Synthesis size error"); fi.resize(N_*stride); #if DEBUG >= 1 cout << "Multi Synthesis with Function....:" << N_ << endl; #endif #if DEBUG >= 2 std::copy(fn.begin(), fn.end(), std::ostream_iterator(std::cout, " ")); #endif r_8 invalphaFact = 1.0/alphaFact_; //1/alpha! vector facts(N_); //sqrt(n!/(n+alpha)!) en iteratif facts[0] = invalphaFact; for(int n=1; n LnAll(N_); //all the values Lag_n(r) n:0...N-1 vector LnkMtx(N_*N_); //all the values Lag_n(r) n:0...N-1 TRY r_16->r_8 for (int k=0; k > vtmp(N_); for (int l=0; l fln = fn[l+ n*stride]; for (int k=0; k