18 namespace FunctionTree {
22 for (
auto x : DataSample.
Data)
48 std::make_shared<
Value<std::vector<double>>>(*p));
51 std::make_shared<
Value<std::vector<std::complex<double>>>>(*p));
55 std::make_shared<ComPWA::FunctionTree::FitParameter>(*p));
63 std::vector<std::shared_ptr<Parameter>> pars) {
68 std::shared_ptr<FitParameter>
70 std::shared_ptr<FitParameter> tmp;
73 }
catch (std::exception &ex) {
79 throw BadParameter(
"ParameterList::addUniqueParameter() | FitParameter " +
81 " found in list but match is not identical!");
88 std::dynamic_pointer_cast<FunctionTree::FitParameter>(par));
92 switch (par->type()) {
94 addParameter(std::dynamic_pointer_cast<FunctionTree::FitParameter>(par));
107 for (
auto i : values)
112 switch (par->type()) {
123 std::dynamic_pointer_cast<
Value<std::complex<double>>>(par));
128 std::dynamic_pointer_cast<
Value<std::vector<int>>>(par));
133 std::dynamic_pointer_cast<
Value<std::vector<double>>>(par));
138 std::dynamic_pointer_cast<
Value<std::vector<std::complex<double>>>>(
149 s <<
"Integer values [" <<
IntValues.size() <<
"]:" << std::endl;
151 s << p->to_str() << std::endl;
154 s <<
"Double values [" <<
DoubleValues.size() <<
"]:" << std::endl;
156 s << p->to_str() << std::endl;
159 s <<
"Complex values [" <<
ComplexValues.size() <<
"]:" << std::endl;
161 s << p->to_str() << std::endl;
164 s <<
"Multi integer values [" <<
MultiIntValues.size() <<
"]:" << std::endl;
166 s << p->to_str() << std::endl;
170 <<
"]:" << std::endl;
172 s << p->to_str() << std::endl;
176 <<
"]:" << std::endl;
178 s << p->to_str() << std::endl;
181 s <<
"Fit parameters [" <<
FitParameters.size() <<
"]:" << std::endl;
183 s << p->to_str() << std::endl;
std::vector< std::shared_ptr< Value< std::vector< double > > > > MultiDoubleValues
virtual void addValue(std::shared_ptr< Parameter > value)
void DeepCopy(const ParameterList &in)
Clear this parameter and deep-copy all parameters from in.
Implementations of Parameter for various data types.
virtual void addParameters(std::vector< std::shared_ptr< Parameter >> pars)
virtual void addParameter(std::shared_ptr< Parameter > par)
std::vector< std::shared_ptr< Value< std::vector< std::complex< double > > > > > MultiComplexValues
virtual void addValues(std::vector< std::shared_ptr< Parameter >> values)
std::vector< double > Weights
std::shared_ptr< Value< std::vector< double > > > MDouble(std::string name, size_t s, double el=0.)
std::shared_ptr< FitParameter > addUniqueParameter(std::shared_ptr< FitParameter > par)
std::vector< std::shared_ptr< Value< double > > > DoubleValues
std::vector< std::shared_ptr< Value< int > > > IntValues
virtual std::size_t numValues() const
std::shared_ptr< FitParameter > FindParameter(std::string name, const ParameterList &v)
Search ParameterList for a FitParameter with name.
virtual std::size_t numParameters() const
virtual std::string to_str() const
A public function returning a string with parameter information.
std::vector< std::shared_ptr< Value< std::complex< double > > > > ComplexValues
std::vector< std::shared_ptr< Value< std::vector< int > > > > MultiIntValues
std::vector< std::shared_ptr< FitParameter > > FitParameters
This class provides a list of parameters and values of different types.