00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_METRIC2_H
00020 #define MARSYAS_METRIC2_H
00021
00022 #include "MarSystem.h"
00023
00024 namespace Marsyas
00025 {
00035 class Metric2: public MarSystem
00036 {
00037 private:
00038 MarControlPtr ctrl_metric_;
00039 MarControlPtr ctrl_covMatrix_;
00040 realvec vec_i_;
00041 realvec vec_j_;
00042
00043
00044 mrs_real (*metricFunc_)(const realvec& vec_i, const realvec& vec_j, const realvec& cov);
00045
00046 void addControls();
00047 void myUpdate(MarControlPtr sender);
00048 static mrs_real logLikelihood(const realvec& Vi, const realvec& Vj, const realvec& covMatrix);
00049
00050 public:
00051 Metric2(std::string name);
00052 Metric2(const Metric2& a);
00053 ~Metric2();
00054
00055 MarSystem* clone() const;
00056 void myProcess(realvec& in, realvec& out);
00057 };
00058 }
00059
00060 #endif
00061
00062
00063