CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
Sqrt.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id: Sqrt.cc,v 1.7 2010/06/16 18:22:01 garren Exp $
3
#include "
CLHEP/GenericFunctions/Sqrt.hh
"
4
#include <assert.h>
5
#include <cmath>
// for sqrt
6
namespace
Genfun {
7
FUNCTION_OBJECT_IMP
(Sqrt)
8
9
Sqrt
::
Sqrt
()
10
{}
11
12
Sqrt::Sqrt
(
const
Sqrt
& right)
13
{
14
}
15
16
Sqrt::~Sqrt
() {
17
}
18
19
double
Sqrt::operator()
(
double
x)
const
{
20
return
sqrt(x);
21
}
22
23
24
Derivative
Sqrt::partial
(
unsigned
int
index)
const
{
25
assert(index==0);
26
const
AbsFunction
& fPrime = (0.5)/
Sqrt
();
27
return
Derivative
(&fPrime);
28
}
29
30
31
}
// namespace Genfun
Generated on Sun Jun 17 2012 08:08:27 for CLHEP by
1.8.1.1