CSIM: filterfunction.h Source File

filterfunction.h

Go to the documentation of this file.
00001 
00005 #ifndef _FILTERFUNCTION_H_
00006 #define _FILTERFUNCTION_H_
00007 
00008 #include <string>
00009 #include <map>
00010 #include <list>
00011 #include "csimerror.h"
00012 #include "advanceable.h"
00013 
00014 using namespace std;
00015 
00017 class FilterFunction : public Advancable {
00018 
00019  public:
00020   FilterFunction(void);
00021 
00022   virtual ~FilterFunction(void) {};
00023 
00027   virtual void setParameter(string name, double value);
00028 
00030   virtual int advance(void) {
00031     return 1;
00032   }
00033 
00035   virtual int addIncoming(Advancable *Incoming) {
00036     return 0;
00037   }
00038 
00040   virtual int addOutgoing(Advancable *Outgoing) {
00041     return 0;
00042   }
00043 
00044 
00048   virtual double getParameter(string name);
00049 
00052   virtual list<string> validParameters(void);
00053 
00054 
00055   /* Filter a response signal of the neural microcircuit.
00056       \param R Response of the neural microcircuit.
00057       \param X Target vector where to save the results. 
00058       \param indices Indices where to store the results in X.
00059       \return -1 if an error occured, 1 for success. */
00060   virtual int filter(const double* r, double* x, int* indices=0) = 0;
00061 
00062 
00064   virtual void reset() = 0;
00065 
00066 
00068   virtual int updateInternal() {return 0;};
00069 
00070  protected:
00071 
00073   map<string, double *> params;
00074 };
00075 
00076 #endif
00077 

 
(C) 2003, Thomas Natschläger last modified 07/10/2006