28 #ifndef _math_optimize_gaussianfit_h
29 #define _math_optimize_gaussianfit_h
40 template<
typename Function,
typename Weight>
44 static const bool weigh_F = 0;
48 typedef std::pair<Exp, Coef> Gaussian;
49 typedef std::vector<Gaussian> Gaussians;
51 GaussianFit(
unsigned int N,
const Weight& W,
double left,
double right,
60 static const int k_ = 0;
65 mutable std::vector<std::pair<Exp, Coef> > gaussians_;
76 static const int classdebug_ = 0;
79 void extract_params()
const;
81 void assign_params()
const;
88 Slater1D(
double a,
int k = 0,
double c = 1.0) :
91 double operator()(
double x)
const {
92 return c_ * std::pow(x, k_) * std::exp(-a_ * x);
102 Gaussian1D(
double a,
int k = 0,
double c = 1.0) :
103 k_(k), a_(a), c_(c) {
105 double operator()(
double x)
const {
106 return c_ * std::pow(x, k_) * std::exp(-a_ * x * x);
117 k_(k), l_(l), a_(a), c_(c) {
119 double operator()(
double x)
const {
120 return c_ * std::pow(x, k_) * std::exp(-a_ * std::pow(x, l_));
GaussianFit(unsigned int N, const Weight &W, double left, double right, unsigned int NP)
Will fit a function F with weight W evenly sampled on NP points in an interval [left,...
Definition: gaussianfit.timpl.h:61
const Gaussians & operator()(const Function &F) const
fit F and return the parameters of the fit.
Definition: gaussianfit.timpl.h:195
The Function class is an abstract base class that, given a set of coordinates, will compute a value a...
Definition: function.h:44
Gaussian1D(k,x) = c x^k exp(-a*x^2)
Definition: gaussianfit.h:100
PowerExponential1D(k,l,x) = c x^k exp(-a*x^l)
Definition: gaussianfit.h:114
Slater1D(k,x) = .
Definition: gaussianfit.h:86
GaussianFit<Function> is a fit of Function(x)*Weight(x) to N Gaussians on range [left,...
Definition: gaussianfit.h:41
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Generated at Sun Jan 26 2020 23:24:00 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.