Gaudi Framework, version v25r0
Home
Generated: Mon Feb 17 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiGSL
GaudiMath
NumericalDerivative.h
Go to the documentation of this file.
1
// $Id: NumericalDerivative.h,v 1.2 2008/10/27 19:22:20 marcocle Exp $
2
// ============================================================================
3
#ifndef GAUDIMATH_NUMERICALDERIVATIVE_H
4
#define GAUDIMATH_NUMERICALDERIVATIVE_H 1
5
// ============================================================================
6
// Include files
7
// ============================================================================
8
// GaudiKernel
9
// ============================================================================
10
#include "
GaudiKernel/StatusCode.h
"
11
// ============================================================================
12
// CLHEP
13
// ============================================================================
14
#include "CLHEP/GenericFunctions/AbsFunction.hh"
15
// ============================================================================
16
17
namespace
Genfun
18
{
19
namespace
GaudiMathImplementation
20
{
36
class
GAUDI_API
NumericalDerivative
:
public
AbsFunction
37
{
38
public
:
40
enum
Type
41
{
Central
,
42
Forward
,
43
Backward } ;
44
public
:
46
FUNCTION_OBJECT_DEF(
NumericalDerivative
)
47
48
public:
49
85
NumericalDerivative
86
( const AbsFunction& function ,
87
const
size_t
index ,
88
const
Type
&
type
= Central ) ;
89
91
NumericalDerivative
92
( const
NumericalDerivative
& right ) ;
93
95
virtual ~
NumericalDerivative
() ;
96
98
virtual
unsigned
int
dimensionality()
const
{
return
m_DIM ; }
99
101
virtual
double
operator() (
double
argument )
const
;
103
virtual
double
operator() (
const
Argument& argument )
const
;
104
106
virtual
bool
hasAnalyticDerivative
()
const
{
return
true ;}
107
109
virtual
Derivative
partial (
unsigned
int
index )
const
;
110
111
public
:
112
114
const
AbsFunction&
function
()
const
{
return
*m_function ; }
116
size_t
index
()
const
{
return
m_index ; }
118
const
Type
&
type
()
const
{
return
m_type ; }
119
121
const
Type
& setType (
const
Type
& value );
122
124
double
result
()
const
{
return
m_result ; }
126
double
error
()
const
{
return
m_error ; }
127
128
protected
:
129
130
StatusCode
Exception
131
(
const
std::string
& message ,
132
const
StatusCode
&
sc
=
StatusCode::FAILURE
)
const
;
133
134
private
:
135
136
// default constructor is disabled
137
NumericalDerivative
();
138
// assignement operator is disabled
139
NumericalDerivative
& operator=(
const
NumericalDerivative
& ) ;
140
141
private
:
142
const
AbsFunction*
m_function
;
143
size_t
m_index
;
144
size_t
m_DIM
;
145
Type
m_type
;
146
//
147
mutable
Argument
m_argument
;
148
mutable
double
m_result
;
149
mutable
double
m_error
;
150
};
151
152
}
// end of namespace GaudiMathImplementation
153
}
// end of namespace GenFun
154
155
// ============================================================================
156
// The END
157
// ============================================================================
158
#endif // GAUDIMATH_NUMERICALDERIVATIVE_H
159
// ============================================================================
Generated at Mon Feb 17 2014 14:37:41 for Gaudi Framework, version v25r0 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004