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

FixedConstant.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: FixedConstant.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $
00003 #include "CLHEP/GenericFunctions/FixedConstant.hh"
00004 #include <assert.h>
00005 
00006 namespace Genfun {
00007 FUNCTION_OBJECT_IMP(FixedConstant)
00008 
00009 FixedConstant::FixedConstant(double value):
00010 _value(value)
00011 {
00012 }
00013 
00014 FixedConstant::FixedConstant(const FixedConstant & right):
00015 AbsFunction(right), _value(right._value) {
00016 }
00017 
00018 FixedConstant::~FixedConstant()
00019 {
00020 }
00021 
00022 double FixedConstant::operator ()(double) const
00023 {
00024   return _value;
00025 }
00026 
00027 Derivative FixedConstant::partial(unsigned int index) const {
00028   assert(index==0);
00029   FixedConstant fPrime(0.0);
00030   return Derivative(&fPrime);
00031 }
00032 
00033 } // namespace Genfun

Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7