Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::API::ICostFunction Class Referenceabstract

An interface for specifying the cost function to be used with Fit algorithm or minimizers, for example, the default being least squares fitting. More...

#include <ICostFunction.h>

Inheritance diagram for Mantid::API::ICostFunction:
Mantid::CurveFitting::CostFunctions::CostFuncFitting Mantid::CurveFitting::CostFunctions::CostFuncLeastSquares Mantid::CurveFitting::CostFunctions::CostFuncPoisson Mantid::CurveFitting::CostFunctions::CostFuncRwp Mantid::CurveFitting::CostFunctions::CostFuncUnweightedLeastSquares Mantid::CurveFitting::FuncMinimisers::MaleableCostFunction

Public Member Functions

virtual void deriv (std::vector< double > &der) const =0
 Calculate the derivatives of the cost function. More...
 
virtual double getParameter (size_t i) const =0
 Get i-th parameter. More...
 
virtual std::string name () const =0
 Get name of minimizer. More...
 
virtual size_t nParams () const =0
 Number of parameters. More...
 
virtual void setParameter (size_t i, const double &value)=0
 Set i-th parameter. More...
 
virtual std::string shortName () const
 Get short name of minimizer - useful for say labels in guis. More...
 
virtual double val () const =0
 Calculate value of cost function. More...
 
virtual double valAndDeriv (std::vector< double > &der) const =0
 Calculate the value and the derivatives of the cost function. More...
 
virtual ~ICostFunction ()=default
 Virtual destructor. More...
 

Detailed Description

An interface for specifying the cost function to be used with Fit algorithm or minimizers, for example, the default being least squares fitting.

Author
Anders Markvardsen, ISIS, RAL
Date
11/05/2010

Definition at line 24 of file ICostFunction.h.

Constructor & Destructor Documentation

◆ ~ICostFunction()

virtual Mantid::API::ICostFunction::~ICostFunction ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ deriv()

virtual void Mantid::API::ICostFunction::deriv ( std::vector< double > &  der) const
pure virtual

Calculate the derivatives of the cost function.

Parameters
der:: Container to output the derivatives

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.

◆ getParameter()

virtual double Mantid::API::ICostFunction::getParameter ( size_t  i) const
pure virtual

Get i-th parameter.

Parameters
i:: Index of a parameter
Returns
:: Value of the parameter

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.

◆ name()

virtual std::string Mantid::API::ICostFunction::name ( ) const
pure virtual

◆ nParams()

virtual size_t Mantid::API::ICostFunction::nParams ( ) const
pure virtual

Number of parameters.

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.

◆ setParameter()

virtual void Mantid::API::ICostFunction::setParameter ( size_t  i,
const double &  value 
)
pure virtual

Set i-th parameter.

Parameters
i:: Index of a parameter
value:: New value of the parameter

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.

◆ shortName()

virtual std::string Mantid::API::ICostFunction::shortName ( ) const
inlinevirtual

◆ val()

virtual double Mantid::API::ICostFunction::val ( ) const
pure virtual

Calculate value of cost function.

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.

◆ valAndDeriv()

virtual double Mantid::API::ICostFunction::valAndDeriv ( std::vector< double > &  der) const
pure virtual

Calculate the value and the derivatives of the cost function.

Parameters
der:: Container to output the derivatives
Returns
:: The value of the function

Implemented in Mantid::CurveFitting::CostFunctions::CostFuncFitting.


The documentation for this class was generated from the following file: