29 ~ProcLinear()
override {}
31 void configure(ConfIterator iter,
unsigned int n)
override;
32 void eval(ValueIterator iter,
unsigned int n)
const override;
33 std::vector<double> deriv(ValueIterator iter,
unsigned int n)
const override;
36 std::vector<double> coeffs;
45 void ProcLinear::configure(ConfIterator iter,
unsigned int n) {
47 iter++(Variable::FLAG_OPTIONAL);
49 iter << Variable::FLAG_OPTIONAL;
52 void ProcLinear::eval(ValueIterator iter,
unsigned int n)
const {
55 for (std::vector<double>::const_iterator coeff = coeffs.begin(); coeff != coeffs.end(); coeff++, ++iter) {
60 sum += *coeff * *iter;
66 std::vector<double> ProcLinear::deriv(ValueIterator iter,
unsigned int n)
const {
67 std::vector<double>
result;
69 for (std::vector<double>::const_iterator coeff = coeffs.begin(); coeff != coeffs.end(); coeff++, ++iter) {
71 result.push_back(*coeff);