Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
functions.cpp
Go to the documentation of this file.
1#include "functions.h"
2
3ScaledForm::ScaledForm(const RealValuedForm& f, const std::vector<double>& x0, const std::vector<double>& scales) : f(f), x0(x0), s(scales) {}
4
5double ScaledForm::operator()(const std::vector<double>& t) const {
6 std::vector<double> x(t.size());
7 for (size_t i = 0; i < t.size(); i++) {
8 x[i] = this->x0[i] + this->s[i] * t[i];
9
10 // std::cout << "t_i = " << t[i] << ", s_i = " << s[i] << ", x0_i = " << x0[i] << ", x_i = " << x[i] << std::endl;
11 }
12
13 double fx = this->f(x);
14
15 // std::cout << "f(x) = " << fx << std::endl;
16 return fx;
17}
std::function< double(std::vector< double >)> RealValuedForm
Definition functions.h:11
double f(double x)
Wilson special function f depending on x.
RealValuedForm f
Definition functions.h:15
std::vector< double > s
Definition functions.h:17
std::vector< double > x0
Definition functions.h:16
ScaledForm(const RealValuedForm &f, const std::vector< double > &x0, const std::vector< double > &scales)
Definition functions.cpp:3
double operator()(const std::vector< double > &t) const
Definition functions.cpp:5