00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_SELFSIMILARITYMATRIX_H
00020 #define MARSYAS_SELFSIMILARITYMATRIX_H
00021
00022 #include "MarSystem.h"
00023 #include "Metric.h"
00024
00025 namespace Marsyas
00026 {
00038 class SelfSimilarityMatrix: public MarSystem
00039 {
00040 private:
00041 realvec i_featVec_;
00042 realvec j_featVec_;
00043 realvec stackedFeatVecs_;
00044 realvec metricResult_;
00045
00046 realvec vars_;
00047 realvec covMatrix_;
00048
00049 MarControlPtr ctrl_stdDev_;
00050 MarControlPtr ctrl_covMatrix_;
00051 MarControlPtr ctrl_calcCovMatrix_;
00052 MarControlPtr ctrl_normalize_;
00053
00054 MarControlPtr ctrl_mode_;
00055 MarControlPtr ctrl_instanceIndexes_;
00056 MarControlPtr ctrl_nInstances_;
00057 MarControlPtr ctrl_done_;
00058
00059 void addControls();
00060 void myUpdate(MarControlPtr sender);
00061
00062 public:
00063 enum covMatrixType {
00064 noCovMatrix = 0,
00065 fixedStdDev = 1,
00066 diagCovMatrix = 2,
00067 fullCovMatrix = 3
00068 };
00069
00070 enum mode {
00071 outputDistanceMatrix = 0,
00072 outputPairDistance = 1
00073 };
00074
00075 SelfSimilarityMatrix(std::string name);
00076 SelfSimilarityMatrix(const SelfSimilarityMatrix& a);
00077 ~SelfSimilarityMatrix();
00078
00079 MarSystem* clone() const;
00080
00081 void myProcess(realvec& in, realvec& out);
00082 };
00083 }
00084
00085 #endif
00086
00087
00088