CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
base_double.hpp
1
#ifndef CPPAD_CG_BASE_DOUBLE_INCLUDED
2
#define CPPAD_CG_BASE_DOUBLE_INCLUDED
3
/* --------------------------------------------------------------------------
4
* CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5
* Copyright (C) 2012 Ciengis
6
*
7
* CppADCodeGen is distributed under multiple licenses:
8
*
9
* - Eclipse Public License Version 1.0 (EPL1), and
10
* - GNU General Public License Version 3 (GPL3).
11
*
12
* EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13
* terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14
* ----------------------------------------------------------------------------
15
* Author: Joao Leal
16
*/
17
18
namespace
CppAD
{
19
23
CPPAD_NUMERIC_LIMITS(
double
, cg::CG<double>)
24
25
28
template
<>
29
inline
cg::CG<double>
epsilon<cg::CG<double> >() {
30
return
std::numeric_limits<double>::epsilon();
31
}
32
36
inline
cg::CG<double>
azmul
(
const
cg::CG<double>
& x,
const
cg::CG<double>
& y) {
37
cg::CG<double>
zero(0.0);
38
if
(x == zero)
39
return
zero;
40
return
x * y;
41
}
42
//CPPAD_AZMUL( cg::CG<double> )
43
44
}
// END CppAD namespace
45
46
#endif
47
CppAD::cg::CG
Definition:
cg.hpp:29
CppAD::azmul
cg::CG< double > azmul(const cg::CG< double > &x, const cg::CG< double > &y)
Definition:
base_double.hpp:36
CppAD
Definition:
abstract_atomic_fun.hpp:19
include
cppad
cg
base_double.hpp
Generated on Sat May 3 2025 16:08:04 for CppADCodeGen by
1.8.13