26#ifndef SCIMATH_FUNCTION_H
27#define SCIMATH_FUNCTION_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/Vector.h>
32#include <casacore/casa/BasicMath/Functional.h>
33#include <casacore/casa/Utilities/Assert.h>
34#include <casacore/scimath/Functionals/FunctionParam.h>
35#include <casacore/scimath/Functionals/FunctionTraits.h>
38#include <casacore/casa/iosfwd.h>
199 public Functional<typename FunctionTraits<T>::ArgType, U>,
200 public Functional<Vector<typename FunctionTraits<T>::ArgType>, U> {
217 template <
class W,
class X>
343template<
class T,
class U>
348template<
class T,
class U>
350 return fun.
print(os); }
354#ifndef CASACORE_NO_AUTO_TEMPLATES
355#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
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
const T & operator[](const uInt n) const
virtual U operator()(const ArgType &x, const ArgType &y) const
Function(const Vector< T > &in)
virtual U operator()(const ArgType &x) const
FunctionParam< T > & parameters()
virtual Function< T, U > * clone() const =0
Return a copy of this object from the heap.
virtual void getMode(RecordInterface &mode) const
virtual U operator()() const
Evaluate this function object at xor at x, y.
virtual Function< typename FunctionTraits< T >::BaseType > * cloneNonAD() const
Bool & mask(const uInt n)
Manipulate the mask associated with the nth parameter (e.g.
const Bool & mask(const uInt n) const
virtual U operator()(FunctionArg x) const
const FunctionParam< T > & parameters() const
Return the parameter interface.
void lockParam()
Compiler cannot always find the correct 'const' version of parameter access.
Function(const Function< W, X > &other)
T & operator[](const uInt n)
Manipulate the nth parameter (0-based) with no index check.
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 const String & name() const
Specify the name associated with the function (default will be unknown)
virtual U operator()(const ArgType &x, const ArgType &y, const ArgType &z) const
Vector< ArgType > arg_p
Aid for non-contiguous argument storage.
ostream & print(ostream &os) const
Print the function (i.e.
virtual U operator()(const Vector< ArgType > &x) const
const Vector< ArgType > & argp() const
Get arg_p and parset_p.
Bool parset_p
Indicate parameter written.
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
virtual Function< typename FunctionTraits< T >::DiffType > * cloneAD() const
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const Function< T, U > &fun)
Output declaration.