CLHEP VERSION Reference Documentation
CLHEP Home Page CLHEP Documentation CLHEP Bug Reports |
00001 // -*- C++ -*- 00002 // $Id: Sin.cc,v 1.5 2003/10/10 17:40:39 garren Exp $ 00003 #include "CLHEP/GenericFunctions/Sin.hh" 00004 #include "CLHEP/GenericFunctions/Cos.hh" 00005 #include <assert.h> 00006 #include <cmath> 00007 00008 namespace Genfun { 00009 FUNCTION_OBJECT_IMP(Sin) 00010 00011 Sin::Sin() 00012 {} 00013 00014 Sin::~Sin() { 00015 } 00016 00017 Sin::Sin(const Sin & right) : AbsFunction(right) 00018 { } 00019 00020 00021 double Sin::operator() (double x) const { 00022 return sin(x); 00023 } 00024 00025 00026 00027 Derivative Sin::partial(unsigned int index) const { 00028 assert(index==0); 00029 const AbsFunction & fPrime = Cos(); 00030 return Derivative(& fPrime); 00031 } 00032 00033 } // namespace Genfun