14namespace CurveFitting {
33 Jacobian(
size_t ny,
size_t np) : m_ny(ny), m_np(np) {
m_data.resize(ny * np, 0.0); }
44 for (
size_t iY = 9; iY < m_ny; iY += 10)
47 throw std::runtime_error(
"Try to add number to column of Jacobian matrix "
48 "which does not exist.");
52 void set(
size_t iY,
size_t iP,
double value)
override {
54 throw std::out_of_range(
"Data index in Jacobian is out of range");
62 double get(
size_t iY,
size_t iP)
override {
64 throw std::out_of_range(
"Data index in Jacobian is out of range");
69 return m_data[iY * m_np + iP];
double value
The value of the point.
const std::vector< Type > & m_data
Represents the Jacobian in IFitFunction::functionDeriv.
size_t m_ny
Number of data points.
double get(size_t iY, size_t iP) override
overwrite base method
Jacobian(size_t ny, size_t np)
Constructor.
void zero() override
overwrite base method
std::vector< double > m_data
Storage for the derivatives.
void set(size_t iY, size_t iP, double value) override
overwrite base method
size_t m_np
Number of parameters in a function (== IFunction::nParams())
void addNumberToColumn(const double &value, const size_t &iP) override
overwrite base method
Exception thrown when a fitting function changes number of parameters during fit.
Helper class which provides the Collimation Length for SANS instruments.