CLHEP 2.0.4.7 Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Sqrt.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: Sqrt.cc,v 1.4.4.1 2004/04/29 00:20:36 garren Exp $
00003 #include "CLHEP/GenericFunctions/Sqrt.hh"
00004 #include <assert.h>
00005 #include <cmath>        // for sqrt
00006 namespace Genfun {
00007 FUNCTION_OBJECT_IMP(Sqrt)
00008 
00009 Sqrt::Sqrt()
00010 {}
00011 
00012 Sqrt::Sqrt(const Sqrt & right)
00013 {
00014 }
00015 
00016 Sqrt::~Sqrt() {
00017 }
00018 
00019 double Sqrt::operator() (double x) const {
00020   return sqrt(x);
00021 }
00022 
00023 
00024 Derivative Sqrt::partial(unsigned int index) const {
00025   assert(index==0);
00026   const AbsFunction & fPrime = (0.5)/Sqrt();
00027   return Derivative(&fPrime);
00028 }
00029 
00030 
00031 } // namespace Genfun

Generated on Thu Jul 1 22:02:31 2010 for CLHEP by  doxygen 1.4.7