12 #ifndef __OCPTable_HEADER__
13 #define __OCPTable_HEADER__
36 OCPTable(
const vector<vector<OCP_DBL>>& src);
39 void Setup(
const vector<vector<OCP_DBL>>& src);
42 bool IsEmpty()
const {
return data.empty(); }
51 void PushCol(
const vector<OCP_DBL>& v) { data.push_back(v); }
54 vector<OCP_DBL>&
GetCol(
const USI& j) {
return data[j]; }
59 nRow = data[0].size();
66 USI Eval_All(
const USI& j,
const OCP_DBL& val, vector<OCP_DBL>& outdata,
67 vector<OCP_DBL>& slope);
71 USI Eval_All0(
const OCP_DBL& val, vector<OCP_DBL>& outdata);
93 vector<vector<OCP_DBL>> data;
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
void SetRowCol()
Setup row nums and col nums of tables, initialize the bId.
vector< OCP_DBL > & GetCol(const USI &j)
return the jth column in table to modify or use.
OCPTable()=default
Default constructor.
bool IsEmpty() const
judge if table is empty.
void PushCol(const vector< OCP_DBL > &v)
push v into the last column of table.
USI GetColNum() const
return the column num of table.