20 : LogLikelihoods(Estimators) {}
30 auto CurrentSubRangeBegin = params.begin();
32 size_t SubRangeSize = LLH->getParameters().size();
33 std::vector<double> SubParameterRange;
34 SubParameterRange.reserve(SubRangeSize);
35 std::copy(CurrentSubRangeBegin, CurrentSubRangeBegin + SubRangeSize,
36 std::back_inserter(SubParameterRange));
37 CurrentSubRangeBegin += SubRangeSize;
38 LLH->updateParametersFrom(SubParameterRange);
43 std::vector<ComPWA::Parameter> Parameters;
45 auto pars = x->getParameters();
46 Parameters.insert(Parameters.end(), pars.begin(), pars.end());
52 std::tuple<FunctionTreeEstimator, FitParameterList>
58 unsigned int counter(1);
63 auto EvaluationTree = std::make_shared<ComPWA::FunctionTree::TreeNode>(
64 std::make_shared<Value<double>>(),
67 for (
auto &x : Estimators) {
69 EvaluationTree->addNode(x.first.getFunctionTree());
70 }
catch (std::exception &ex) {
71 LOG(ERROR) <<
"createSumMinLogLHEstimatorFunctionTree(): Construction of " 72 "one or more sub trees has failed! Error: " 76 TempParameters.insert(TempParameters.begin(), x.second.begin(),
79 EvaluationTree->fillParameters(ParList);
82 auto result = std::find_if(TempParameters.begin(), TempParameters.end(),
84 return fp.Name == x->name();
86 if (TempParameters.end() != result) {
87 Pars.push_back(*result);
91 EvaluationTree->parameter();
double evaluate() noexcept final
Value of minimum log likelihood function.
std::vector< FitParameter< double > > FitParameterList
void updateParametersFrom(const std::vector< double > ¶ms) final
It is important to input the vector in the same length and order as defined in the getParameters() me...
std::vector< ComPWA::Parameter > getParameters() const final
std::vector< std::shared_ptr< Estimator > > LogLikelihoods
SumMinLogLH(std::vector< std::shared_ptr< Estimator >> Estimators)
virtual std::vector< std::shared_ptr< FitParameter > > & doubleParameters()
This class provides a list of parameters and values of different types.
std::tuple< FunctionTreeEstimator, FitParameterList > createSumMinLogLHFunctionTreeEstimator(std::vector< std::pair< ComPWA::FunctionTree::FunctionTreeEstimator, FitParameterList >> Estimators)