/* * mod.cpp * * Created on: May 31, 2013 * Author: azoghbi */ #include "inc/mod.hpp" mod::mod() { n = 0 ; nfq = 0 ; npar = 0; dt = 0; info = 0;f1=0;f2=0; } mod::~mod() {} void mod::init( vec fqL , int fac ){ // --------------- Freq stuff----------------- // int i,j; nfq = fqL.length() - 1; npar = nfq * fac ; FqL.setlength(nfq+1); for( i=0 ; i<=nfq ; i++ ){ FqL[i] = fqL[i]; } // ------------------------------------------ // // ---------------- Integrals ---------------- // Cfq.resize( nfq );Sfq.resize( nfq ); for( i=0 ; i&cfq , vector& sfq ){ //fqL[0] *= 1e-6; fqL[nfq]*=2; int i,j,k, nfq=fqL.length()-1; double tt,norm,t1,t2,pi=M_PI,pidt=pi*dt,sdt2,sdt1,cdt2,cdt1,s2dt2,s2dt1,c2dt2,c2dt1,dtmt,dtpt; double st2,st1,ct2,ct1, sm2,sm1,cm2,cm1, sp2,sp1,cp2,cp1; vec w; w.setlength(nfq+1); for( k=0 ; k<=nfq ; k++ ){ w[k] = 2*pi*fqL[k]; } norm = 1./( pidt*pidt ); for( i=0 ; i