30 return weight * (expected - current);
34 double expected_value,
double weight)
36 parameter.addObserver(
37 [
this, ¶meter, expected_value, weight](
double){
38 m_residual =
computeResidual(parameter.getEngineValue(), expected_value, weight);
EngineParameter are those derived from the minimization process.
virtual ~EngineValueResidual()
Destructor.
void populateResidualBlock(IterType output_iter) override
std::size_t numberOfResiduals() const override
Always returns 1, as this class creates a single residual.
EngineValueResidual(EngineParameter ¶meter, double expected_value, double weight=1.)
Constructs a new instance of EngineValueResidual.
double getEngineValue() const
static double computeResidual(double current, double expected, double weight)