CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
GenericFunctions
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
11
#include "
CLHEP/GenericFunctions/AbsFunction.hh
"
12
#include <vector>
13
namespace
Genfun {
14
class
ArrayFunction :
public
AbsFunction {
15
16
FUNCTION_OBJECT_DEF
(
ArrayFunction
)
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
Generated on Mon May 6 2013 04:04:10 for CLHEP by
1.8.1.2