CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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
5
#include "
CLHEP/GenericFunctions/Ln.hh
"
6
#include "
CLHEP/GenericFunctions/Variable.hh
"
7
#include <assert.h>
8
#include <cmath>
// for log()
9
10
namespace
Genfun {
11
FUNCTION_OBJECT_IMP
(Ln)
12
13
Ln
::
Ln
()
14
{}
15
16
Ln::~Ln
() {
17
}
18
19
Ln::Ln
(
const
Ln
& 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
Generated on Sun Jun 17 2012 08:08:26 for CLHEP by
1.8.1.1