SourceXtractorPlusPlus  0.16
Please provide a description of the project.
FlexibleModelFitting.h
Go to the documentation of this file.
1 
17 /*
18  * FlexibleModelFitting.h
19  *
20  * Created on: Sep 17, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_
25 #define _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_
26 
27 #include <unordered_map>
28 #include <ElementsKernel/Logging.h>
29 
30 #include "SEUtils/Types.h"
33 
34 namespace SourceXtractor {
35 
37 
38 // FlexibleModelFitting property class to contain the results from the model fitting
39 
41 public:
42  virtual ~FlexibleModelFitting() = default;
43 
44  FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason,
45  SeFloat chi_squared, SeFloat duration, Flags flags,
46  std::unordered_map<int, double> parameter_values,
47  std::unordered_map<int, double> parameter_sigmas,
48  std::vector<SeFloat> chi_squared_per_meta,
49  std::vector<int> iterations_per_meta,
50  int meta_iterations) :
51  m_iterations(iterations),
52  m_stop_reason(stop_reason),
53  m_chi_squared(chi_squared),
54  m_duration(duration),
55  m_flags(flags),
56  m_parameter_values(parameter_values),
57  m_parameter_sigmas(parameter_sigmas),
58  m_chi_squared_per_meta(chi_squared_per_meta),
59  m_iterations_per_meta(iterations_per_meta),
60  m_meta_iterations(meta_iterations)
61 {}
62 
63  unsigned int getIterations() const {
64  return m_iterations;
65  }
66 
67  unsigned int getStopReason() const {
68  return m_stop_reason;
69  }
70 
72  return m_chi_squared;
73  }
74 
75  Flags getFlags() const {
76  return m_flags;
77  }
78 
79  SeFloat getParameterValue(int index) const {
80  return m_parameter_values.at(index);
81  }
82 
83  SeFloat getParameterSigma(int index) const {
84  return m_parameter_sigmas.at(index);
85  }
86 
87  SeFloat getDuration() const {
88  return m_duration;
89  }
90 
93  }
94 
96  return m_iterations_per_meta;
97  }
98 
99  int getMetaIterations() const {
100  return m_meta_iterations;
101  }
102 
103 private:
109 
113 };
114 
115 }
116 
117 #endif /* _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTING_H_ */
T at(T... args)
FlexibleModelFitting(unsigned int iterations, unsigned int stop_reason, SeFloat chi_squared, SeFloat duration, Flags flags, std::unordered_map< int, double > parameter_values, std::unordered_map< int, double > parameter_sigmas, std::vector< SeFloat > chi_squared_per_meta, std::vector< int > iterations_per_meta, int meta_iterations)
std::unordered_map< int, double > m_parameter_sigmas
std::vector< int > getIterationsPerMetaIteration() const
std::vector< SeFloat > getChiSquaredPerMetaIteration() const
SeFloat getParameterValue(int index) const
SeFloat getParameterSigma(int index) const
std::unordered_map< int, double > m_parameter_values
Base class for all Properties. (has no actual content)
Definition: Property.h:33
Flags
Flagging of bad sources.
Definition: SourceFlags.h:37
SeFloat32 SeFloat
Definition: Types.h:32
Elements::Logging model_fitting_logger