SourceXtractorPlusPlus
0.13
Please provide a description of the project.
|
ResidualBlockProvider implementation for adding a prior to a parameter engine value. More...
#include <EngineValueResidual.h>
Public Member Functions | |
EngineValueResidual (EngineParameter ¶meter, double expected_value, double weight=1.) | |
Constructs a new instance of EngineValueResidual. More... | |
virtual | ~EngineValueResidual () |
Destructor. More... | |
std::size_t | numberOfResiduals () const override |
Always returns 1, as this class creates a single residual. More... | |
void | populateResidualBlock (IterType output_iter) override |
![]() | |
virtual | ~ResidualBlockProvider ()=default |
Destructor. More... | |
Private Attributes | |
double | m_residual |
Additional Inherited Members | |
![]() | |
using | IterType = double * |
ResidualBlockProvider implementation for adding a prior to a parameter engine value.
The residual is calculated as:
\[ r = w*(P_c-P_p) \]
where:
Definition at line 46 of file EngineValueResidual.h.
ModelFitting::EngineValueResidual::EngineValueResidual | ( | EngineParameter & | parameter, |
double | expected_value, | ||
double | weight = 1. |
||
) |
Constructs a new instance of EngineValueResidual.
Note that this class will add an observer to the parameter which requires that the EngineValueResidual instance is still alive when it is called. For this reason, any updates of a parameter value after a related EngineValueResidual is deleted, leeds to undefined behavior.
parameter | A reference to the parameter the residual is calculated for |
expected_value | The prior expected engine value |
weight | The weight or the residual |
Definition at line 33 of file EngineValueResidual.cpp.
References ModelFitting::BasicParameter::addObserver(), ModelFitting::computeResidual(), ModelFitting::EngineParameter::getEngineValue(), and m_residual.
|
virtualdefault |
Destructor.
|
overridevirtual |
Always returns 1, as this class creates a single residual.
Implements ModelFitting::ResidualBlockProvider.
Definition at line 43 of file EngineValueResidual.cpp.
|
overridevirtual |
Updates the value where the iterator points with the value of the residual for the current value of the parameter
Implements ModelFitting::ResidualBlockProvider.
Definition at line 47 of file EngineValueResidual.cpp.
References m_residual.
|
private |
Definition at line 80 of file EngineValueResidual.h.
Referenced by EngineValueResidual(), and populateResidualBlock().