26#ifndef SCIMATH_COMPOUNDFUNCTION_H
27#define SCIMATH_COMPOUNDFUNCTION_H
30#include <casacore/casa/aips.h>
31#include <casacore/scimath/Functionals/CompoundParam.h>
32#include <casacore/scimath/Functionals/Function.h>
33#include <casacore/scimath/Mathematics/AutoDiff.h>
34#include <casacore/scimath/Mathematics/AutoDiffMath.h>
185#define CompoundFunction_PS CompoundFunction
215 CompoundFunction_PS<AutoDiff<T> > &
221 virtual ~CompoundFunction_PS() {}
238 CompoundFunction_PS<AutoDiff<T> > &consolidate() { fromParam_p();
239 toParam_p();
return *
this; }
250 *cloneNonAD()
const {
258 void fromParam_p()
const;
276#undef CompoundFunction_PS
281#ifndef CASACORE_NO_AUTO_TEMPLATES
282#include <casacore/scimath/Functionals/CompoundFunction.tcc>
283#include <casacore/scimath/Functionals/Compound2Function.tcc>
#define CompoundFunction_PS
virtual Function< typename FunctionTraits< AutoDiff< T > >::BaseType > * cloneNonAD() const
void toParam_p()
Make the general block from local parameters.
virtual Function< typename FunctionTraits< AutoDiff< T > >::DiffType > * cloneAD() const
CompoundFunction_PS()
The default constructor – no functions, no parameters, nothing, the function operator returns a 0.
CompoundFunction_PS(const CompoundFunction_PS< W > &other)
virtual Function< AutoDiff< T > > * clone() const
Return a copy of this object from the heap.
CompoundFunction_PS(const CompoundFunction_PS< AutoDiff< T > > &other)
Make this object a (deep) copy of other.
CompoundFunction_PS< AutoDiff< T > > & operator=(const CompoundFunction_PS< AutoDiff< T > > &other)
Make this object a (deep) copy of other.
void fromParam_p() const
Copy the local parameters to/from general block.
virtual AutoDiff< T > eval(typename Function< AutoDiff< T > >::FunctionArg x) const
Evaluate the function and its derivatives at x wrt to the coefficients.
CompoundFunction_PS< AutoDiff< T > > & consolidate()
Consolidate the parameter settings.
virtual ~CompoundFunction_PS()
Destructor.
uInt addFunction(const Function< AutoDiff< T > > &newFunction)
Add a function to the sum.
CompoundFunction(const CompoundFunction< T > &other)
Make this object a (deep) copy of other.
CompoundFunction< T > & operator=(const CompoundFunction< T > &other)
Make this object a (deep) copy of other.
virtual ~CompoundFunction()
Destructor.
virtual Function< T > * clone() const
Return a copy of this object from the heap.
virtual Function< typename FunctionTraits< T >::BaseType > * cloneNonAD() const
virtual T eval(typename Function< T >::FunctionArg x) const
Evaluate the function at x.
CompoundFunction()
The default constructor – no functions, no parameters, nothing, the function operator returns a 0.
CompoundFunction< T > & consolidate()
Consolidate the parameter settings.
void fromParam_p() const
Copy the local parameters from general block.
CompoundFunction(const CompoundFunction< T > &other, Bool)
virtual Function< typename FunctionTraits< T >::DiffType > * cloneAD() const
void toParam_p()
Make the general block from local parameters.
CompoundFunction(const CompoundFunction< W > &other)
CompoundFunction(const CompoundFunction< W > &other, Bool)
Block< uInt > funpar_p
Index of function belonging to parameter.
Block< uInt > paroff_p
Index of offset for each function to its parameters in general list.
CompoundParam< T > & operator=(const CompoundParam< T > &other)
const Function< T > & function(uInt which) const
Return a reference to a specific Function.
PtrBlock< Function< T > * > functionPtr_p
Pointer to each added function.
Block< uInt > locpar_p
Index of local parameter.
uInt nFunctions() const
Return the number of functions in the sum.
FunctionParam< T > param_p
The parameters and masks.
Bool parset_p
Indicate parameter written.
uInt nparameters() const
Returns the number of parameters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
PtrHolder< T > & operator=(const PtrHolder< T > &other)