28 #ifndef SCIMATH_FUNCTION_H
29 #define SCIMATH_FUNCTION_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Vector.h>
34 #include <casacore/casa/BasicMath/Functional.h>
35 #include <casacore/casa/Utilities/Assert.h>
36 #include <casacore/scimath/Functionals/FunctionParam.h>
37 #include <casacore/scimath/Functionals/FunctionTraits.h>
40 #include <casacore/casa/iosfwd.h>
46 class RecordInterface;
201 public Functional<typename FunctionTraits<T>::ArgType, U>,
202 public Functional<Vector<typename FunctionTraits<T>::ArgType>, U> {
219 template <
class W,
class X>
345 template<
class T,
class U>
350 template<
class T,
class U>
352 return fun.
print(os); }
356 #ifndef CASACORE_NO_AUTO_TEMPLATES
357 #include <casacore/scimath/Functionals/Function.tcc>
#define DebugAssert(expr, exception)
T ArgType
Type for arguments.
FunctionParam< T > param_p
The parameters and masks.
FunctionTraits< T >::ArgType ArgType
Bool & mask(const uInt n)
Manipulate the mask associated with the nth parameter (e.g.
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
virtual Function< T, U > * clone() const =0
Return a copy of this object from the heap.
virtual U operator()(const ArgType &x, const ArgType &y) const
virtual Function< typename FunctionTraits< T >::BaseType > * cloneNonAD() const
Function(const Vector< T > &in)
virtual U operator()(const ArgType &x) const
virtual const String & name() const
Specify the name associated with the function (default will be unknown)
ostream & print(ostream &os) const
Print the function (i.e.
virtual void getMode(RecordInterface &mode) const
virtual U operator()() const
Evaluate this function object at xor at x, y.
virtual U operator()(FunctionArg x) const
void lockParam()
Compiler cannot always find the correct 'const' version of parameter access.
Function(const Function< W, X > &other)
const Bool & mask(const uInt n) const
const FunctionParam< T > & parameters() const
Return the parameter interface.
virtual uInt ndim() const =0
Returns the number of dimensions of function.
virtual Bool hasMode() const
return True if the implementing function supports a mode.
virtual ~Function()
Destructor.
virtual U operator()(const ArgType &x, const ArgType &y, const ArgType &z) const
const T & operator[](const uInt n) const
FunctionParam< T > & parameters()
Vector< ArgType > arg_p
Aid for non-contiguous argument storage.
virtual Function< typename FunctionTraits< T >::DiffType > * cloneAD() const
virtual U operator()(const Vector< ArgType > &x) const
Bool parset_p
Indicate parameter written.
T & operator[](const uInt n)
Manipulate the nth parameter (0-based) with no index check.
Function(const FunctionParam< T > &other)
virtual U eval(FunctionArg x) const =0
Evaluate the function object.
uInt nparameters() const
Returns the number of parameters.
Bool locked_p
Indicate that parameters are expected to be locked from changing.
const ArgType * FunctionArg
const Vector< ArgType > & argp() const
Get arg_p and parset_p.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.