00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017                                                                           
00018 
00019 #ifndef BANDS_H
00020 #define BANDS_H
00021 
00022 #include <Eigen/StdVector>
00023 #include <vector>
00024 
00025 #include "Typedefs.h"
00026 #include "Debug.h"
00027 
00049 class Bands {
00050 protected:
00051   
00052   MatrixXI _starts;
00053   std::vector<MatrixXR> _weights;
00054 
00055   
00056 
00057 public:
00061   Bands();
00062   
00073   Bands(MatrixXI starts, std::vector<MatrixXR> weights);
00074 
00078   ~Bands();
00079 
00092   void process(const MatrixXR&  frames, MatrixXR* bands);
00093 
00094   void setup();
00095   void reset();
00096 
00102   std::vector<MatrixXR> weights() const;
00103 
00109   void bandWeights(int band, MatrixXR* bandWeights) const;
00110 
00114   void starts(MatrixXI* result) const;
00115 
00119   int bands() const;
00120 
00126   void setStartsWeights(const MatrixXI& starts, std::vector<MatrixXR> weights, bool callSetup = true);
00127 };
00128 
00129 #endif