22 using namespace PhysicsTools;
31 ProcMatrix(
const char *
name,
34 virtual ~ProcMatrix() {}
36 virtual void configure(ConfIterator iter,
unsigned int n);
37 virtual void eval(ValueIterator iter,
unsigned int n)
const;
38 virtual std::vector<double> deriv(ValueIterator iter,
39 unsigned int n)
const;
45 rows(calib->
rows), cols(calib->columns),
48 inline unsigned int getRows()
const {
return rows; }
49 inline unsigned int getCols()
const {
return cols; }
51 inline double operator () (
unsigned int row,
52 unsigned int col)
const
53 {
return coeffs[row * cols +
col]; }
58 std::vector<double> coeffs;
66 ProcMatrix::ProcMatrix(
const char *
name,
74 void ProcMatrix::configure(ConfIterator iter,
unsigned int n)
82 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
86 void ProcMatrix::eval(ValueIterator iter,
unsigned int n)
const
88 double *sums = (
double*)alloca(
matrix.getRows() *
sizeof(double));
89 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
94 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
98 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
102 std::vector<double> ProcMatrix::deriv(ValueIterator iter,
103 unsigned int n)
const
105 std::vector<double>
result;
108 for(
unsigned int row = 0; row <
matrix.getRows(); row++)
detail::ThreadSafeRegistry< ParameterSetID, ParameterSet, ProcessParameterSetIDCache > Registry
MVATrainerComputer * calib