RTXI 1.3
plugins/include/DSP/arma_src.cpp
Go to the documentation of this file.
00001 //
00002 //  File = armaproc.cpp
00003 //
00004 
00005 #include <stdlib.h>
00006 #include <fstream>
00007 #include "arma_src.h"
00008 #include "gausrand.h"
00009 #include "yulewalk.h"
00010 #include "mod_yuwa.h"
00011 
00012 //=======================================================
00013 //  ArmaSource - subclass of ArmaProcess for case where 
00014 //               AR coefficients are known or assumed and 
00015 //               are provided as input parameters
00016 
00017 template <class T>
00018 ArmaSource<T>::ArmaSource( int ar_order,
00019                            T *a_coeffs,
00020                            int ma_order,
00021                            T *b_coeffs,
00022                            double drv_noise_var )
00023               :ArmaProcess<T>()
00024 {
00025   int i;
00026   Ar_Order = ar_order;
00027   Ma_Order = ma_order;
00028   Noise_Seed = 31415927; // arbitrary default
00029   Drv_Noise_Var = drv_noise_var;
00030 
00031   A_Coeffs = new T[ar_order+1];
00032   for( i=0; i<=ar_order; i++) A_Coeffs[i] = a_coeffs[i];
00033 
00034   B_Coeffs = new T[ma_order+1];
00035   for( i=0; i<=ma_order; i++) B_Coeffs[i] = b_coeffs[i];
00036 
00037   Old_Input = new T[ma_order+1];
00038   for( i=0; i<=ma_order; i++) 
00039                 Old_Input[i] = 0.0;
00040   Old_Output = new T[ar_order];
00041   for( i=0; i<ar_order; i++)
00042                 Old_Output[i] = 0.0;
00043 }
00044 //-------------------------------------
00045 //  Explicit instantiations of template
00046 template ArmaSource<double>;
00047 template ArmaSource<complex>;
00048 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines