21 using namespace PhysicsTools;
30 ProcLinear(
const char *
name,
33 virtual ~ProcLinear() {}
35 virtual void configure(ConfIterator iter,
unsigned int n);
36 virtual void eval(ValueIterator iter,
unsigned int n)
const;
37 virtual std::vector<double> deriv(
38 ValueIterator iter,
unsigned int n)
const;
41 std::vector<double> coeffs;
47 ProcLinear::ProcLinear(
const char *
name,
51 coeffs(calib->coeffs),
56 void ProcLinear::configure(ConfIterator iter,
unsigned int n)
59 iter++(Variable::FLAG_OPTIONAL);
61 iter << Variable::FLAG_OPTIONAL;
64 void ProcLinear::eval(ValueIterator iter,
unsigned int n)
const
68 for(std::vector<double>::const_iterator coeff = coeffs.begin();
69 coeff != coeffs.end(); coeff++, ++iter) {
74 sum += *coeff * *iter;
80 std::vector<double> ProcLinear::deriv(ValueIterator iter,
unsigned int n)
const
82 std::vector<double>
result;
84 for(std::vector<double>::const_iterator coeff = coeffs.begin();
85 coeff != coeffs.end(); coeff++, ++iter) {
87 result.push_back(*coeff);
detail::ThreadSafeRegistry< ParameterSetID, ParameterSet, ProcessParameterSetIDCache > Registry
MVATrainerComputer * calib
unsigned int offset(bool)