17namespace HistogramData {
20namespace CurveFitting {
80 std::string
name()
const override {
return "BivariateNormal"; }
82 const std::string
category()
const override {
return "Peak"; }
84 void function1D(
double *out,
const double *xValues,
const size_t nData)
const override;
86 void functionDeriv1D(
API::Jacobian *out,
const double *xValues,
const size_t nData)
override;
91 std::vector<std::string> V;
92 V.emplace_back(
"CalcVariances");
97 if (!hasAttribute(attName))
98 throw std::invalid_argument(
"Not a valid attribute name");
108 if (!hasAttribute(attName))
109 throw std::invalid_argument(
"Not a valid attribute name");
111 CalcVariances =
value.asBool();
114 CalcVxx = CalcVyy = CalcVxy =
true;
116 declareParameter(
"SScol", 0.00,
"Variance of the column(x) values");
117 declareParameter(
"SSrow", 0.00,
"Variance of the row(y) values");
118 declareParameter(
"SSrc", 0.00,
"Covariance of the column(x) and row(y) values");
119 CalcVxx = CalcVyy = CalcVxy =
false;
123 bool hasAttribute(
const std::string &attName)
const override {
return attName ==
"CalcVariances"; }
128 void init()
override;
138 double initCoeff(
const HistogramData::HistogramY &D,
const HistogramData::HistogramY &X,
139 const HistogramData::HistogramY &Y,
double &coefNorm,
double &expCoeffx2,
double &expCoeffy2,
140 double &expCoeffxy,
int &NCells,
double &Varxx,
double &Varxy,
double &Varyy)
const;
143 double SIxx, SIyy, SIxy, Sxx, Syy, Sxy;
149 double LastParams[9];
double value
The value of the point.
Mantid::API::IFunction::Attribute Attribute
This is a specialization of IFunction for functions of one real argument.
This is a specialization of IFunction for functions defined on a MatrixWorkspace.
Attribute is a non-fitting parameter.
Represents the Jacobian in IFitFunction::functionDeriv.
Implements the part of IFunction interface dealing with parameters.
Provide peak shape function interface a Peak shape on one time slice of a RectangularDetector.
bool CalcVariances
from experimental data versus fit the (Co)Variances
bool hasAttribute(const std::string &attName) const override
Check if attribute attName exists.
double * expVals
Save common exponential values for each cell.
void setAttribute(const std::string &attName, const Attribute &value) override
Set a value to attribute attName.
size_t nAttributes() const override
Returns the number of attributes associated with the function.
const std::string category() const override
The categories the Fit function belong to.
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names.
std::string name() const override
overwrite IFunction base class methods
Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName.
Helper class which provides the Collimation Length for SANS instruments.