Go to the documentation of this file.
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;
200 template<
class T,
class U=T>
class Function :
201 public Functional<typename FunctionTraits<T>::ArgType, U>,
202 public Functional<Vector<typename FunctionTraits<T>::ArgType>, U> {
219 template <
class W,
class X>
353 template<
class T,
class U>
358 template<
class T,
class U>
360 return fun.print(os); }
364 #ifndef CASACORE_NO_AUTO_TEMPLATES
365 #include <casacore/scimath/Functionals/Function.tcc>
366 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual U operator()() const
Evaluate this function object at xor at x, y.
virtual void getMode(RecordInterface &mode) const
Vector< ArgType > arg_p
Aid for non-contiguous argument storage.
const typedef ArgType * FunctionArg
virtual uInt ndim() const =0
Returns the number of dimensions of function.
Bool & mask(const uInt n)
Manipulate the mask associated with the nth parameter (e.g.
virtual Bool hasMode() const
return True if the implementing function supports a mode.
FunctionTraits< T >::ArgType ArgType
Map a domain object into a range object via operator().
Bool parset_p
Indicate parameter written.
Function(const Function< W, X > &other)
uInt nparameters() const
Returns the number of parameters.
Function(const Function< T, U > &other)
ostream & print(ostream &os) const
Print the function (i.e.
virtual U operator()(FunctionArg x) const
ostream & operator<<(ostream &os, const Function< T, U > &fun)
Output declaration.
#define DebugAssert(expr, exception)
T ArgType
Type for arguments.
const T & operator[](const uInt n) const
FunctionParam< T > param_p
The parameters and masks.
const FunctionParam< T > & parameters() const
Return the parameter interface.
virtual const String & name() const
Specify the name associated with the function (default will be unknown)
virtual ~Function()
Destructor.
const Vector< ArgType > & argp() const
Get arg_p and parset_p.
const Bool & mask(const uInt n) const
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
virtual U operator()(const ArgType &x) const
Function(const FunctionParam< T > &other)
void lockParam()
Compiler cannot always find the correct 'const' version of parameter access.
this file contains all the compiler specific defines
Container of function parameters with masking flags.
FunctionParam< T > & parameters()
Function(const Vector< T > &in)
virtual Function< typename FunctionTraits< T >::BaseType > * cloneNonAD() const
Numerical functional interface class.
Abstract base class for Record classes.
T & operator[](const uInt n)
Manipulate the nth parameter (0-based) with no index check.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual U eval(FunctionArg x) const =0
Evaluate the function object.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
A 1-D Specialization of the Array class.
Base class for all Casacore library errors.
virtual Function< typename FunctionTraits< T >::DiffType > * cloneAD() const
virtual Function< T, U > * clone() const =0
Return a copy of this object from the heap.
Function data types for parameters and arguments.
Bool locked_p
Indicate that parameters are expected to be locked from changing.