MCRM.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SILENCEMCRM_H
00023 #define SILENCEMCRM_H
00024 #include "Platform.hpp"
00025 #ifdef SWIG
00026 %module CsoundAC
00027 %include "std_string.i"
00028 %include "std_vector.i"
00029 %{
00030 #include "Silence.hpp"
00031 #include <vector>
00032 %}
00033 #else
00034 #include "Silence.hpp"
00035 #endif
00036
00037 namespace csound
00038 {
00039 class MCRM :
00040 public ScoreNode
00041 {
00042
00043 std::vector< ublas::matrix<double> > transformations;
00044
00045 ublas::matrix<double> weights;
00046
00047 int depth;
00048
00049 void iterate(int depth, size_t p, const Event &event, double weight);
00050 public:
00051 MCRM();
00052 virtual ~MCRM();
00053 void setDepth(int depth);
00054 void resize(size_t transformations);
00055 void setTransformationElement(size_t index, size_t row, size_t column, double value);
00056 void setWeight(size_t precursor, size_t successor, double weight);
00057 void generate();
00058
00059 virtual void produceOrTransform(Score &score,
00060 size_t beginAt,
00061 size_t endAt,
00062 const ublas::matrix<double> &coordinates);
00063 };
00064 }
00065 #endif