Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

DiagGMM.h

00001 // Copyright (C) 2001 Jean-Marc Valin
00002 
00003 #ifndef DIAG_GMM_H
00004 #define DIAG_GMM_H
00005 #include "Object.h"
00006 #include <vector>
00007 
00008 namespace FD {
00009 
00010 class GMM;
00011 
00014 class DiagGMM : public Object {
00016    char *ptr;
00017 
00019    float *base;
00020 
00022    int dim;
00023 
00025    int augDim;
00026 
00028    int nbGauss;
00029 
00030 public:
00031    //DiagGMM(const GMM &gmm);
00032    DiagGMM() {ptr=NULL;}
00033 
00035    ~DiagGMM() {if (ptr) delete [] ptr;}
00036 
00037    void train (const std::vector<float *> &frames, int nb_dim, int nb_gaussians, int nb_splits);
00038 
00040    float score(const float *vec);
00041 
00043    int getDim() {return dim;}
00044 
00046    virtual void printOn(std::ostream &out=std::cout) const;
00047 
00049    void readFrom (std::istream &in=std::cin);
00050 
00052    friend std::istream &operator >> (std::istream &in, DiagGMM &gmm);
00053 
00054    virtual void serialize(std::ostream &out) const;
00055 
00056    virtual void unserialize(std::istream &in);
00057 
00058    friend class GMM;
00059 };
00060 
00061 std::istream &operator >> (std::istream &in, DiagGMM &gmm);
00062 
00063 }//namespace FD
00064 
00065 #endif /* DIAG_GMM_H */

Generated on Wed Oct 5 14:28:55 2005 for FlowDesigner by  doxygen 1.4.4