GeoModel - GeoModelCore
FunctionDirectProduct.h
1 //==========================================================================//
2 // Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3 // Joe Boudreau. Software licensed under the terms and conditions of the //
4 // GNU Lesser Public License v3. //
5 //==========================================================================//
6 
7 //--------------------------FunctionDirectProduct---------------------------//
8 // //
9 // FunctionDirectProduct, result of multiplication of taking the direct //
10 // product of two functions: f(x)*g(y)= h(x,y). The direct product always //
11 // gives a function taking an argument of higher dimensionality than the //
12 // arguments. //
13 // //
14 //--------------------------------------------------------------------------//
15 #ifndef FunctionDirectProduct_h
16 #define FunctionDirectProduct_h 1
17 #include "GeoGenericFunctions/AbsFunction.h"
18 
19 namespace GeoGenfun {
20 
22 
23  FUNCTION_OBJECT_DEF(FunctionDirectProduct)
24 
25  public:
26 
27  // Constructor
28  FunctionDirectProduct(const AbsFunction *arg1, const AbsFunction *arg2);
29 
30  // Copy constructor
32 
33  // Destructor
34  virtual ~FunctionDirectProduct();
35 
36  // Retreive function value
37  virtual double operator ()(double argument) const override; // Gives an error.
38  virtual double operator ()(const Argument & a) const override; // Must use this one
39 
40  // Dimensionality
41  virtual unsigned int dimensionality() const override;
42 
43  // Derivative.
44  virtual Derivative partial (unsigned int) const override;
45 
46  // Does this function have an analytic derivative?
47  virtual bool hasAnalyticDerivative() const override {return true;}
48 
49  private:
50 
51  // It is illegal to assign a FunctionDirectProduct
52  const FunctionDirectProduct & operator=(const FunctionDirectProduct &right);
53 
54  AbsFunction *_arg1;
55  AbsFunction *_arg2;
56  unsigned int _m; // dimension of arg1
57  unsigned int _n; // dimension of arg2
58 
59  };
60 } // namespace GeoGenfun
61 #endif
Definition: Abs.h:15