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>
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 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
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition:
AbsFunction.hh:143
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::Argument
Definition:
Argument.hh:17
Genfun::ArrayFunction
Definition:
ArrayFunction.hh:14
Genfun::ArrayFunction::~ArrayFunction
virtual ~ArrayFunction()
Definition:
ArrayFunction.cc:17
Genfun::ArrayFunction::operator()
virtual double operator()(double argument) const override
Definition:
ArrayFunction.cc:24
Genfun
Definition:
Abs.hh:14
CLHEP-CLHEP_2_4_6_4
GenericFunctions
GenericFunctions
ArrayFunction.hh
Generated by
1.9.6