SourceXtractorPlusPlus  0.10
Please provide a description of the project.
FlexibleModelFittingPrior.cpp
Go to the documentation of this file.
1 
17 /*
18  * FlexibleModelFittingPrior.cpp
19  *
20  * Created on: 2018 M11 16
21  * Author: mschefer
22  */
23 
24 #include <iostream>
25 #include <mutex>
26 
28 
33 
34 
37 
41 
43 
44 namespace SourceXtractor {
45 
46 using namespace ModelFitting;
47 
49  FlexibleModelFittingParameterManager& parameter_manager, const SourceInterface& source,
50  ResidualEstimator& residual_estimator) const {
51  double expected_value = m_expected_value(source);
52  double weight = 1. / m_standard_deviation(source);
53 
54  auto prior_residual = std::unique_ptr<WorldValueResidual>(
55  new WorldValueResidual(parameter_manager.getParameter(source, m_parameter), expected_value, weight));
56  residual_estimator.registerBlockProvider(std::move(prior_residual));
57 }
58 
59 }
60 
void setupPrior(FlexibleModelFittingParameterManager &parameter_manager, const SourceInterface &source, ModelFitting::ResidualEstimator &residual_estimator) const
void registerBlockProvider(std::unique_ptr< ResidualBlockProvider > provider)
Registers a ResidualBlockProvider to the ResidualEstimator.
T move(T... args)
STL class.
Provides to the LeastSquareEngine the residual values.
The SourceInterface is an abstract "source" that has properties attached to it.
std::shared_ptr< ModelFitting::BasicParameter > getParameter(const SourceInterface &source, std::shared_ptr< const FlexibleModelFittingParameter > parameter) const
ResidualBlockProvider implementation for adding a prior to a parameter world value.