00001
00002
00003 #ifndef CODEBOOKMAP_H
00004 #define CODEBOOKMAP_H
00005
00006 #include <math.h>
00007 #include <vector>
00008 #include <iostream>
00009 #include "Object.h"
00010 #include "vq.h"
00011 #include "Vector.h"
00012
00013 namespace FD {
00014
00015 class CodebookMap;
00016
00017 std::ostream &operator << (std::ostream &out, const CodebookMap &cell);
00018
00019
00020 class CodebookMap : public Object {
00021 protected:
00022 RCPtr<VQ> mapIn;
00023
00024 Vector<Vector<float> > mapOut;
00025
00026 public:
00027
00028
00029
00030 CodebookMap(){}
00031
00032 CodebookMap (const CodebookMap &) {std::cerr << "don't call the CodebookMap copy constructor\n"; exit(1);}
00033
00034 CodebookMap(const RCPtr<VQ> &_mapIn, const std::vector<float *> dataIn, const std::vector<float *> dataOut, int length);
00035
00036 ~CodebookMap()
00037 {
00038 }
00039
00040
00041 const float * calcOutput(const float *in) const;
00042
00043 void printOn(std::ostream &out) const;
00044
00045 void readFrom (std::istream &in);
00046
00047 friend std::istream &operator >> (std::istream &in, CodebookMap &cell);
00048 };
00049
00050 }
00051
00052 #endif