21 using namespace PhysicsTools;
30 ProcMatrix(
const char *
name,
33 virtual ~ProcMatrix() {}
35 virtual void configure(ConfIterator iter,
unsigned int n)
override;
36 virtual void eval(ValueIterator iter,
unsigned int n)
const override;
37 virtual std::vector<double> deriv(ValueIterator iter,
38 unsigned int n)
const override;
44 rows(calib->
rows), cols(calib->columns),
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++)
MVATrainerComputer * calib