Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

sampled_signal.h

Go to the documentation of this file.
00001 #ifndef SAMPLED_SIGNAL_H
00002 #define SAMPLED_SIGNAL_H
00003 
00008 #include <vector>
00009 #include <iostream>
00010 #include "tdsp/dsp_vector.h"
00011 
00012 using namespace std;
00013 
00017 typedef dsp::vector< short > t_Signal;
00018 
00022 template <class T>
00023 class SampledSignal {
00024 
00025         vector<T> negative;
00026         vector<T> positive;
00027         
00028 public:
00029         SampledSignal(long size);
00030         SampledSignal(T * data, unsigned long size);
00031         SampledSignal(const SampledSignal<T> & other, long, long);
00032         T & at(long index);
00033         T at(long index) const;
00034         SampledSignal<T> & add(SampledSignal<T> &, long);
00035         SampledSignal<T> & multiply(SampledSignal<T> &, long);
00036         SampledSignal<T> & applyHanningWindow(long shift, long width, long startIndex, long endIndex);
00037         SampledSignal<T> & readFromFile(string file_name, long start, long end);
00038         long size();
00039         t_Signal convertToDSPVector();
00040         void printTo(ostream& out);
00041         
00042 };
00043 
00044 #include "sampled_signal.cpp"
00045 
00046 #endif
00047  // end of group boss_ola

Generated on Tue Dec 20 23:14:38 2005 for BOSS by doxygen 1.3.6