15#include <boost/python/object.hpp>
18namespace PythonInterface {
43 double centre()
const override;
45 double height()
const override;
52 double fwhm()
const override;
54 void setFwhm(
const double w)
override;
58 void function1D(
double *out,
const double *xValues,
const size_t nData)
const override {
68 void functionLocal(
double *out,
const double *xValues,
const size_t nData)
const override;
70 boost::python::object
functionLocal(
const boost::python::object &xvals)
const;
74 void functionDerivLocal(
const boost::python::object &xvals, boost::python::object &jacobian);
An interface to a peak function, which extend the interface of IFunctionWithLocation by adding method...
void functionDeriv1D(Jacobian *out, const double *xValues, const size_t nData) override
General implementation of the method for all peaks.
void function1D(double *out, const double *xValues, const size_t nData) const override
General implementation of the method for all peaks.
Represents the Jacobian in IFitFunction::functionDeriv.
Provides a layer to hook into the protected functions of IFunction.
Provides a layer class for boost::python to allow C++ virtual functions to be overridden in a Python ...
void setCentre(const double c) override
Calls 'setCentre' method in Python.
void functionLocal(double *out, const double *xValues, const size_t nData) const override
Implemented Base-class method.
void functionDeriv1D(API::Jacobian *out, const double *xValues, const size_t nData) override
Required to solve compiler ambiguity between IPeakFunction & IFunction1DAdapter.
double height() const override
Calls 'height' method in Python.
void function1D(double *out, const double *xValues, const size_t nData) const override
Required to solve compiler ambiguity between IPeakFunction & IFunction1DAdapter.
void setHeight(const double h) override
Calls 'setHeight' method in Python.
double fwhm() const override
Calls Python fwhm method.
IPeakFunctionAdapter(const IPeakFunctionAdapter &)=delete
Disable copy operator - The PyObject must be supplied to construct the object.
IPeakFunctionAdapter & operator=(const IPeakFunctionAdapter &)=delete
Disable assignment operator.
double centre() const override
Calls 'centre' method in Python.
void setFwhm(const double w) override
Called by framework when the width is changed.
void functionDerivLocal(API::Jacobian *jacobian, const double *xValues, const size_t nData) override
Implemented base-class method.
Helper class which provides the Collimation Length for SANS instruments.