30 ProcMatrix(
const char *
name,
33 ~ProcMatrix()
override {}
35 void configure(ConfIterator iter,
unsigned int n)
override;
36 void eval(ValueIterator iter,
unsigned int n)
const override;
37 std::vector<double> deriv(ValueIterator iter,
38 unsigned int n)
const override;
47 inline unsigned int getRows()
const {
return rows; }
48 inline unsigned int getCols()
const {
return cols; }
50 inline double operator () (
unsigned int row,
51 unsigned int col)
const 52 {
return coeffs[row * cols +
col]; }
57 std::vector<double> coeffs;
65 ProcMatrix::ProcMatrix(
const char *
name,
73 void ProcMatrix::configure(ConfIterator iter,
unsigned int n)
79 iter++(Variable::FLAG_NONE);
81 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
82 iter << Variable::FLAG_NONE;
85 void ProcMatrix::eval(ValueIterator iter,
unsigned int n)
const 87 double *sums = (
double*)alloca(
matrix.getRows() *
sizeof(double));
88 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
93 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
97 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
101 std::vector<double> ProcMatrix::deriv(ValueIterator iter,
102 unsigned int n)
const 104 std::vector<double>
result;
107 for(
unsigned int row = 0; row <
matrix.getRows(); row++)