#include #include #include #include #include #include #include #include #include #include #define PRINT_ORIGINAL_SIGNAL 1 #define PRINT_RECONSTRUCTED_SIGNAL 2 #define PRINT_ALL 3 #define CONV_FRACTION 0.05 #define SINC_LOBES 10 class pocs { float* orig_samples; int orig_length; float* irr_samples; int* irr_xi; int irr_length; float *sinc_val; float B; // bandwidth, frequency within [-2piB, 2piB] float Fs; int max_iter; float tol; int final_length; float *final; float *err; float mean_err; float time_taken; int Debug; int DebugLevel; public: pocs(); pocs(float* original_samples, int original_length, float* irreg_samples, int *irreg_locations, int irreg_length, double tolerance, int maxiterations, double bandwidth, double sampl_freq); void reset(float* original_samples, int original_length,float* irreg_samples, int *irreg_locations, int irreg_length,double tolerance, int maxiterations, double bandwidth, double sampl_freq); void project_i( int i); // Projects fk onto Ci using signal(xi) result next_iter(void); // Will be bound to the tcl button. void CheckConvergence(); void GenDiffSignal(); void DebugOn(){Debug = 1;} void DebugOff(){Debug = -1;} void SetDebugLevel(int i); void gen_sinc(void); int iter; int Done; friend ostream& operator << (ostream&,pocs&); }; //////////////////////////////////////////////////////////////////////