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

FixedConstant.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: FixedConstant.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
4 #include <assert.h>
5 
6 namespace Genfun {
7 FUNCTION_OBJECT_IMP(FixedConstant)
8 
9 FixedConstant::FixedConstant(double value):
10 _value(value)
11 {
12 }
13 
15 AbsFunction(right), _value(right._value) {
16 }
17 
19 {
20 }
21 
22 double FixedConstant::operator ()(double) const
23 {
24  return _value;
25 }
26 
27 Derivative FixedConstant::partial(unsigned int index) const {
28  assert(index==0);
29  FixedConstant fPrime(0.0);
30  return Derivative(&fPrime);
31 }
32 
33 } // namespace Genfun