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>
6 namespace Genfun {
7 FUNCTION_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 
20 {
21 }
22 
24  return *_value;
25 }
26 
27 double FloatingConstant::operator ()(double) 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
Derivative partial(unsigned int) const
virtual double getValue() const =0
FloatingConstant(const AbsParameter &p)
#define FUNCTION_OBJECT_IMP(classname)
virtual double operator()(double argument) const