Mantid
Loading...
Searching...
No Matches
CostFuncPoisson.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12
13namespace Mantid {
14namespace CurveFitting {
15namespace CostFunctions {
16
20class MANTID_CURVEFITTING_DLL CostFuncPoisson : public CostFuncFitting {
21public:
24 virtual std::string name() const override { return "Poisson"; }
26 virtual std::string shortName() const override { return "Poisson"; };
27
28 void addVal(API::FunctionDomain_sptr domain, API::FunctionValues_sptr values) const override;
29 void addValDerivHessian(API::IFunction_sptr function, API::FunctionDomain_sptr domain,
30 API::FunctionValues_sptr values, bool evalDeriv = true,
31 bool evalHessian = true) const override;
32
33private:
35 void calculateDerivative(API::IFunction &function, const API::FunctionDomain &domain,
36 API::FunctionValues &values) const;
38 void calculateHessian(API::IFunction &function, const API::FunctionDomain &domain,
39 const API::FunctionValues &values) const;
40};
41
42} // namespace CostFunctions
43} // namespace CurveFitting
44} // namespace Mantid
Base class that represents the domain of a function.
A class to store values calculated by a function.
This is an interface to a fitting function - a semi-abstarct class.
Definition: IFunction.h:163
A semi-abstract class for a cost function for fitting functions.
CostFuncPoisson : Implements a cost function for fitting applications using a Poisson measure.
virtual std::string name() const override
Get name of minimizer.
virtual std::string shortName() const override
Get short name of minimizer - useful for say labels in guis.
std::shared_ptr< FunctionValues > FunctionValues_sptr
typedef for a shared pointer
std::shared_ptr< IFunction > IFunction_sptr
shared pointer to the function base class
Definition: IFunction.h:732
std::shared_ptr< FunctionDomain > FunctionDomain_sptr
typedef for a shared pointer
Helper class which provides the Collimation Length for SANS instruments.