CEBL  2.1
Lag.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
18 #ifndef FEATURELAG_H
19 #define FEATURELAG_H
20 
21 //relative to cebl source dir
22 #include "model/Feature.hpp"
23 
24 namespace CEBL
25 {
26  class Lag : public Feature
27  {
28  private:
29  int n_lags;
30 
31  ublas::matrix<double> buffer;
32  bool bufferEmpty;
33 
34 
35  public:
36  Lag();
37 
39  std::map<std::string, CEBL::Param> getParamsList();
40  void setParamsList(std::map<std::string, CEBL::Param> &);
41 
43  ublas::matrix<double> use(const ublas::matrix<double> &);
44 
46  void reset();
47 
48  //saving and loading
49  map<string, SerializedObject> save() const;
50  void load(map<string, SerializedObject> objects);
51 
52  };
53 }
54 
55 #endif