16 std::map<std::string, CEBL::Param> Lag::getParamsList()
18 std::map<std::string, CEBL::Param> params;
22 params[
"lags"] = lags;
28 void Lag::setParamsList(std::map<std::string, CEBL::Param> &p)
30 int new_lags = p[
"lags"].getInt();
32 if(new_lags != n_lags)
34 cout <<
"setting lags to " << new_lags <<
"\n";
42 ublas::matrix<double> Lag::use(
const ublas::matrix<double> &data)
47 cout <<
"using lags: " << endl;
48 cout <<
"Lag.cpp: data is" <<
nrow(data) <<
" by " <<
ncol(data) << endl;
49 cout <<
"Num lags is " << n_lags << endl;
57 int nRowsBuffer =
nrow(buffer);
58 int nColsBuffer =
ncol(buffer);
60 int nColsData =
ncol(data);
63 cout <<
"Lag.cpp: data is" <<
nrow(data) <<
" by " <<
ncol(data) << endl;
64 cout <<
"Lag.cpp: buffer was " <<
nrow(buffer) <<
" by " <<
ncol(buffer) << endl;
66 ublas::matrix<double> keep =
68 nColsBuffer-n_lags, nColsBuffer-1);
70 buffer.resize(nRowsBuffer, n_lags+nColsData);
71 nColsBuffer =
ncol(buffer);
73 nColsBuffer-nColsData, nColsBuffer-1) = data;
75 cout <<
"Lag.cpp: buffer now " <<
nrow(buffer) <<
" by " <<
ncol(buffer) << endl;
90 map<string, SerializedObject> ret;
95 void Lag::load(map<string, SerializedObject> objects)