CppADCodeGen  2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
arithmetic_ad.hpp
1 #ifndef CPPAD_CG_ARITHMETIC_AD_INCLUDED
2 #define CPPAD_CG_ARITHMETIC_AD_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 namespace cg {
20 
21 /*******************************************************************************
22  * Operations with AD (resolves ambiguity)
23  ******************************************************************************/
24 template<class Base>
25 inline AD<CG<Base> > operator+(const CG<Base>& left, const AD<CG<Base> >& right) {
26  return CppAD::operator+(left, right);
27 }
28 
29 template<class Base>
30 inline AD<CG<Base> > operator+(const AD<CG<Base> >& left, const CG<Base>& right) {
31  return CppAD::operator+(left, right);
32 }
33 
34 template<class Base>
35 inline AD<CG<Base> > operator-(const CG<Base>& left, const AD<CG<Base> >& right) {
36  return CppAD::operator-(left, right);
37 }
38 
39 template<class Base>
40 inline AD<CG<Base> > operator-(const AD<CG<Base> >& left, const CG<Base>& right) {
41  return CppAD::operator-(left, right);
42 }
43 
44 template<class Base>
45 inline AD<CG<Base> > operator/(const CG<Base>& left, const AD<CG<Base> >& right) {
46  return CppAD::operator/(left, right);
47 }
48 
49 template<class Base>
50 inline AD<CG<Base> > operator/(const AD<CG<Base> >& left, const CG<Base>& right) {
51  return CppAD::operator/(left, right);
52 }
53 
54 template<class Base>
55 inline AD<CG<Base> > operator*(const CG<Base>& left, const AD<CG<Base> >& right) {
56  return CppAD::operator*(left, right);
57 }
58 
59 template<class Base>
60 inline AD<CG<Base> > operator*(const AD<CG<Base> >& left, const CG<Base>& right) {
61  return CppAD::operator*(left, right);
62 }
63 
64 } // END cg namespace
65 } // END CppAD namespace
66 
67 #endif
68 
CppAD
Definition: abstract_atomic_fun.hpp:19