CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

CLHEP/GenericFunctions/FunctionDirectProduct.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: FunctionDirectProduct.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//--------------------------FunctionDirectProduct---------------------------//
4// //
5// FunctionDirectProduct, result of multiplication of taking the direct //
6// product of two functions: f(x)*g(y)= h(x,y). The direct product always //
7// gives a function taking an argument of higher dimensionality than the //
8// arguments. //
9// //
10// Joe Boudreau, Petar Maksimovic, November 1999 //
11// //
12//--------------------------------------------------------------------------//
13#ifndef FunctionDirectProduct_h
14#define FunctionDirectProduct_h 1
16
17namespace Genfun {
18
23 class FunctionDirectProduct : public AbsFunction {
24
26
27 public:
28
29 // Constructor
30 FunctionDirectProduct(const AbsFunction *arg1, const AbsFunction *arg2);
31
32 // Copy constructor
34
35 // Destructor
36 virtual ~FunctionDirectProduct();
37
38 // Retreive function value
39 virtual double operator ()(double argument) const; // Gives an error.
40 virtual double operator ()(const Argument & a) const; // Must use this one
41
42 // Dimensionality
43 virtual unsigned int dimensionality() const;
44
45 // Derivative.
46 Derivative partial (unsigned int) const;
47
48 // Does this function have an analytic derivative?
49 virtual bool hasAnalyticDerivative() const {return true;}
50
51 private:
52
53 // It is illegal to assign a FunctionDirectProduct
54 const FunctionDirectProduct & operator=(const FunctionDirectProduct &right);
55
56 AbsFunction *_arg1;
57 AbsFunction *_arg2;
58 unsigned int _m; // dimension of arg1
59 unsigned int _n; // dimension of arg2
60
61 };
62} // namespace Genfun
63#endif
#define FUNCTION_OBJECT_DEF(classname)
virtual double operator()(double argument) const
virtual unsigned int dimensionality() const
FunctionDirectProduct(const AbsFunction *arg1, const AbsFunction *arg2)
Derivative partial(unsigned int) const