CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

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 $
5#include <assert.h>
6namespace Genfun {
7FUNCTION_OBJECT_IMP(FloatingConstant)
8
10 _value(p.clone())
11{
12 if (_value->parameter() && p.parameter()) _value->parameter()->connectFrom(&p);
13}
14
16 AbsFunction(right), _value(right._value->clone()) {
17}
18
22
24 return *_value;
25}
26
28{
29 return _value->getValue();
30}
31
32Derivative FloatingConstant::partial(unsigned int index) const {
33 assert(index==0);
34 FixedConstant fPrime(0.0);
35 return Derivative(&fPrime);
36}
37} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
virtual double getValue() const =0
Derivative partial(unsigned int) const
FloatingConstant(const AbsParameter &p)
virtual double operator()(double argument) const