CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
11#include "CLHEP/GenericFunctions/AbsFunction.hh"
12#include <vector>
13namespace Genfun {
14class 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 override;
31 virtual double operator ()(const Argument & a) const override {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)
Definition: AbsFunction.hh:143
virtual double operator()(double argument) const override
Definition: Abs.hh:14