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

CLHEP/GenericFunctions/ArrayFunction.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id:
3 #ifndef _ArrayFunction_h_
4 #define _ArrayFunction_h_
5 //-------------------------------------------------------//
6 // This one dimensional function takes its values from //
7 // an array..which it copies in. //
8 //-------------------------------------------------------//
9 
10 
12 #include <vector>
13 namespace Genfun {
14 class ArrayFunction : public AbsFunction {
15 
17 
18  public:
19 
20  // Constructor
21  ArrayFunction(const double *begin, const double *end);
22 
23  // Destructor
24  virtual ~ArrayFunction();
25 
26  // Copy constructor
27  ArrayFunction(const ArrayFunction &right);
28 
29  // Retreive function value
30  virtual double operator ()(double argument) const;
31  virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
32 
33  private:
34 
35  // It is illegal to assign a ArrayFunction
36  const ArrayFunction & operator=(const ArrayFunction &right);
37 
38  std::vector<double> _values;
39 };
40 }
41 #endif
#define FUNCTION_OBJECT_DEF(classname)
ArrayFunction(const double *begin, const double *end)
virtual double operator()(double argument) const