CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
FloatingConstant.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: FloatingConstant.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
3
#include "
CLHEP/GenericFunctions/FloatingConstant.hh
"
4
#include "
CLHEP/GenericFunctions/FixedConstant.hh
"
5
#include <assert.h>
6
namespace
Genfun {
7
FUNCTION_OBJECT_IMP
(FloatingConstant)
8
9
FloatingConstant
::
FloatingConstant
(const
AbsParameter
& p):
10
_value(p.clone())
11
{
12
if
(_value->parameter() && p.parameter()) _value->parameter()->connectFrom(&p);
13
}
14
15
FloatingConstant::FloatingConstant
(
const
FloatingConstant
& right):
16
_value(right._value->clone()) {
17
}
18
19
FloatingConstant::~FloatingConstant
()
20
{
21
}
22
23
AbsParameter
&
FloatingConstant::value
() {
24
return
*_value;
25
}
26
27
double
FloatingConstant::operator ()
(
double
argument)
const
28
{
29
return
_value->
getValue
();
30
}
31
32
Derivative
FloatingConstant::partial
(
unsigned
int
index)
const
{
33
assert(index==0);
34
FixedConstant
fPrime(0.0);
35
return
Derivative
(&fPrime);
36
}
37
}
// namespace Genfun
Generated on Sun Jun 17 2012 08:08:26 for CLHEP by
1.8.1.1