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