10#include <boost/python/class.hpp>
11#include <boost/python/overloads.hpp>
12#include <boost/python/register_ptr_to_python.hpp>
23using getParameterType2 = double (
CompositeFunction::*)(
const std::string &)
const;
25using setParameterType2 = void (
CompositeFunction::*)(
const std::string &,
const double &, bool);
36 register_ptr_to_python<std::shared_ptr<CompositeFunction>>();
38 class_<CompositeFunction, bases<IFunction>, boost::noncopyable>(
"CompositeFunction",
"Composite Fit functions")
44 "Put function in place of the i-th function.")
47 "Get value of parameter of given index.")
49 "Get value of parameter of given name.")
51 "Get value of parameter of given name.")
53 setParameterType2_Overloads((arg(
"self"), arg(
"name"), arg(
"value"), arg(
"explicitlySet")),
54 "Get value of parameter of given name."))
#define GET_POINTER_SPECIALIZATION(TYPE)
void export_CompositeFunction()
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader, valueAsPrettyStr, 0, 2) void export_Property()
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
A composite function is a function containing other functions.
virtual size_t addFunction(IFunction_sptr f)
Add a function at the back of the internal function list.
void setParameter(size_t, const double &value, bool explicitlySet=true) override
Set i-th parameter.
std::size_t nFunctions() const override
Number of functions.
void replaceFunction(size_t functionIndex, const IFunction_sptr &f)
Replace a function.
double getParameter(size_t i) const override
Get i-th parameter.
void removeFunction(size_t i)
Remove a function.
IFunction_sptr getFunction(std::size_t i) const override
Returns the pointer to i-th function.
This is an interface to a fitting function - a semi-abstarct class.