14 : pimpl_(new OwningModel<UncertaintyApproachT>(std::move(uncertaintyApproach)),
15 [](void *uncertaintyApproachBytes) {
16 using Model = OwningModel<UncertaintyApproachT>;
17 auto *
const model =
static_cast<Model *
>(uncertaintyApproachBytes);
20 uncertaintyOperation_([](
void *uncertaintyApproachBytes,
21 const std::vector<double> &values,
const int numCoreErrMember,
22 const double cl, PDFUncertainty &uncertainty) ->
void {
23 using Model = OwningModel<UncertaintyApproachT>;
24 auto *
const model =
static_cast<Model *
>(uncertaintyApproachBytes);
25 return model->Uncertainty(values, numCoreErrMember, cl, uncertainty);
27 correlationOperation_(
28 [](
void *uncertaintyApproachBytes,
const std::vector<double> &valuesA,
29 const std::vector<double> &valuesB,
const int numCoreErrMember) ->
double {
30 using Model = OwningModel<UncertaintyApproachT>;
31 auto *
const model =
static_cast<Model *
>(uncertaintyApproachBytes);
32 return model->Correlation(valuesA, valuesB, numCoreErrMember);
34 clone_([](
void *uncertaintyApproachBytes) ->
void * {
35 using Model = OwningModel<UncertaintyApproachT>;
36 auto *
const model =
static_cast<Model *
>(uncertaintyApproachBytes);
37 return new Model(*model);
43 void Uncertainty(
const std::vector<double> &values,
const int numCoreErrMember,
const double cl,
44 PDFUncertainty &uncertainty)
const
46 uncertaintyOperation_(pimpl_.get(), values, numCoreErrMember, cl, uncertainty);
50 double Correlation(
const std::vector<double> &valuesA,
const std::vector<double> &valuesB,
51 const int numCoreErrMember)
const
53 return correlationOperation_(pimpl_.get(), valuesA, valuesB, numCoreErrMember);
81 swap(pimpl_, copy.pimpl_);
82 swap(clone_, copy.clone_);
83 swap(correlationOperation_, copy.correlationOperation_);
84 swap(uncertaintyOperation_, copy.uncertaintyOperation_);
100 double Correlation(
const std::vector<double> &valuesA,
const std::vector<double> &valuesB,
108 return uncertaintyApporach_.Uncertainty(values, numCoreErrMember, cl, uncertainty);