SourceXtractorPlusPlus 0.19.2
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
FlexibleModelFittingConverterFactory.cpp
Go to the documentation of this file.
1
17/*
18 * FlexibleModelFittingConverterFactory.cpp
19 *
20 * Created on: May 10, 2019
21 * Author: mschefer
22 */
23
25
29
31
32namespace SourceXtractor {
33
34using namespace ModelFitting;
36
38 double initial_value, const SourceInterface& source) const {
39 double minimum_value, maximum_value;
40 std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
41 return make_unique<ExpSigmoidConverter>(minimum_value, maximum_value);
42}
43
45 double initial_value, const SourceInterface& source) const {
46 double minimum_value, maximum_value;
47 std::tie(minimum_value, maximum_value) = m_range(initial_value, source);
48 return make_unique<SigmoidConverter>(minimum_value, maximum_value);
49}
50
52 double initial_value, const SourceInterface& source) const {
53 double factor = m_normalization_factor(initial_value, source);
54 return make_unique<NormalizedConverter>(factor);
55}
56
57
58}
59
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
std::unique_ptr< ModelFitting::CoordinateConverter > getConverter(double initial_value, const SourceInterface &source) const override
The SourceInterface is an abstract "source" that has properties attached to it.
std::unique_ptr< T > make_unique(Args &&... args)
T tie(T... args)