CLHEP 2.0.4.7 Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: FunctionNoop.cc,v 1.3 2003/09/06 14:04:14 boudreau Exp $ 00003 // --------------------------------------------------------------------------- 00004 00005 #include "CLHEP/GenericFunctions/FunctionNoop.hh" 00006 00007 namespace Genfun { 00008 FUNCTION_OBJECT_IMP(FunctionNoop) 00009 00010 FunctionNoop::FunctionNoop(const AbsFunction *arg1): 00011 _arg1(arg1->clone()) 00012 { 00013 } 00014 00015 FunctionNoop::FunctionNoop(const FunctionNoop & right): 00016 _arg1(right._arg1->clone()) 00017 { 00018 } 00019 00020 00021 FunctionNoop::~FunctionNoop() 00022 { 00023 delete _arg1; 00024 } 00025 00026 unsigned int FunctionNoop::dimensionality() const { 00027 return _arg1->dimensionality(); 00028 } 00029 00030 00031 double FunctionNoop::operator ()(double x) const 00032 { 00033 return +((*_arg1)(x)); 00034 } 00035 00036 double FunctionNoop::operator ()(const Argument & x) const 00037 { 00038 return +((*_arg1)(x)); 00039 } 00040 00041 00042 Derivative FunctionNoop::partial(unsigned int index) const { 00043 return _arg1->partial(index); 00044 } 00045 00046 } // namespace Genfun