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

Ln.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Ln.cc,v 1.4 2003/10/10 17:40:39 garren Exp $
3 // ---------------------------------------------------------------------------
4 
7 #include <assert.h>
8 #include <cmath> // for log()
9 
10 namespace Genfun {
12 
13 Ln::Ln()
14 {}
15 
17 }
18 
19 Ln::Ln(const Ln & right) : AbsFunction(right)
20 { }
21 
22 
23 double Ln::operator() (double x) const {
24  return log(x);
25 }
26 
27 
28 
29 Derivative Ln::partial(unsigned int index) const {
30  assert(index==0);
31  const AbsFunction & fPrime = 1.0/Variable();
32  return Derivative(& fPrime);
33 }
34 
35 } // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Ln()
Definition: Ln.cc:13
virtual double operator()(double argument) const
Definition: Ln.cc:23
virtual ~Ln()
Definition: Ln.cc:16
Derivative partial(unsigned int) const
Definition: Ln.cc:29