29 ProcLinear(
const char *
name,
32 ~ProcLinear()
override {}
34 void configure(ConfIterator iter,
unsigned int n)
override;
35 void eval(ValueIterator iter,
unsigned int n)
const override;
36 std::vector<double> deriv(
37 ValueIterator iter,
unsigned int n)
const override;
40 std::vector<double> coeffs;
46 ProcLinear::ProcLinear(
const char *
name,
50 coeffs(calib->coeffs),
55 void ProcLinear::configure(ConfIterator iter,
unsigned int n)
58 iter++(Variable::FLAG_OPTIONAL);
60 iter << Variable::FLAG_OPTIONAL;
63 void ProcLinear::eval(ValueIterator iter,
unsigned int n)
const 67 for(std::vector<double>::const_iterator coeff = coeffs.begin();
68 coeff != coeffs.end(); coeff++, ++iter) {
73 sum += *coeff * *iter;
79 std::vector<double> ProcLinear::deriv(ValueIterator iter,
unsigned int n)
const 81 std::vector<double>
result;
83 for(std::vector<double>::const_iterator coeff = coeffs.begin();
84 coeff != coeffs.end(); coeff++, ++iter) {
86 result.push_back(*coeff);