Marsyas  0.6.0-alpha
/usr/src/RPM/BUILD/marsyas-0.6.0/src/marsyas/marsystems/Signum.cpp
Go to the documentation of this file.
00001 #include "Signum.h"
00002 
00003 using namespace std;
00004 using namespace Marsyas;
00005 
00006 Signum::Signum(mrs_string inName)
00007   :MarSystem("Signum",inName)
00008 {
00009   addControls();
00010 }
00011 
00012 Signum::Signum(const Signum& inToCopy)
00013   :MarSystem(inToCopy) {}
00014 
00015 Signum::~Signum() {}
00016 
00017 MarSystem* Signum::clone() const
00018 {
00019   return new Signum(*this);
00020 }
00021 
00022 void Signum::addControls() {}
00023 
00024 void Signum::myUpdate(MarControlPtr inSender)
00025 {
00026   MarSystem::myUpdate(inSender);
00027 }
00028 
00029 void Signum::myProcess(realvec& inVec, realvec& outVec)
00030 {
00031   mrs_natural t,o;
00032   for (o=0; o<inObservations_; o++)
00033     for (t=0; t<inSamples_; t++)
00034       outVec(o,t) = inVec(o,t)>0?1:0;
00035 }