CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
CLHEP
GenericFunctions
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
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 Sun Jun 17 2012 08:08:26 for CLHEP by
1.8.1.1