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

Ln.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: Ln.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
00003 // ---------------------------------------------------------------------------
00004 
00005 #include "CLHEP/GenericFunctions/Ln.hh"
00006 #include "CLHEP/GenericFunctions/Variable.hh"
00007 #include <assert.h>
00008 #include <cmath>      // for log()
00009 
00010 namespace Genfun {
00011 FUNCTION_OBJECT_IMP(Ln)
00012 
00013 Ln::Ln()
00014 {}
00015 
00016 Ln::~Ln() {
00017 }
00018 
00019 Ln::Ln(const Ln & right) 
00020 {  }
00021 
00022 
00023 double Ln::operator() (double x) const {
00024   return log(x);
00025 }
00026 
00027 
00028 
00029 Derivative Ln::partial(unsigned int index) const {
00030   assert(index==0);
00031   const AbsFunction & fPrime = 1.0/Variable();
00032   return Derivative(& fPrime);
00033 }
00034 
00035 } // namespace Genfun

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