1 | $Id: doc.omh 3803 2016-03-19 05:07:48Z bradbell $ |
---|
2 | /* -------------------------------------------------------------------------- |
---|
3 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell |
---|
4 | |
---|
5 | CppAD is distributed under multiple licenses. This distribution is under |
---|
6 | the terms of the |
---|
7 | Eclipse Public License Version 1.0. |
---|
8 | |
---|
9 | A copy of this license is included in the COPYING file of this distribution. |
---|
10 | Please visit http://www.coin-or.org/CppAD/ for information on other licenses. |
---|
11 | -------------------------------------------------------------------------- */ |
---|
12 | $begin CppAD$$ |
---|
13 | $comment default navigate command for all of CppAD documentation$$ |
---|
14 | $navigate% |
---|
15 | Prev%Prev% |
---|
16 | Next%Next% |
---|
17 | Across%Index% |
---|
18 | Up%Up% |
---|
19 | Down_up_3%_up_3% |
---|
20 | Down_up_2%_up_2% |
---|
21 | Down_up_1%_up_1% |
---|
22 | Down_up_0%_up_0% |
---|
23 | Current%Headings |
---|
24 | %$$ |
---|
25 | $comment ------------------------------------------------------------- |
---|
26 | default automatic indexing command for all CppAD documentaiton |
---|
27 | $$ |
---|
28 | $aindex section head subhead$$ |
---|
29 | $comment ------------------------------------------------------------- |
---|
30 | Latex used throughout the CppAD documentation |
---|
31 | $$ |
---|
32 | $latex |
---|
33 | \newcommand{\W}[1]{ \; #1 \; } |
---|
34 | \newcommand{\R}[1]{ {\rm #1} } |
---|
35 | \newcommand{\B}[1]{ {\bf #1} } |
---|
36 | \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } |
---|
37 | \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } |
---|
38 | \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } |
---|
39 | \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} } |
---|
40 | $$ |
---|
41 | $comment ------------------------------------------------------------- |
---|
42 | hilite commands used throughout the CppAD documentation |
---|
43 | $$ |
---|
44 | $hilitecmd% |
---|
45 | verbatim% |
---|
46 | codep |
---|
47 | %$$ |
---|
48 | $hiliteseq% |
---|
49 | |
---|
50 | CppAD::%AD%<% AD |
---|
51 | % %AD%<% AD |
---|
52 | |
---|
53 | %CppAD::%ADFun%<% FunConstruct |
---|
54 | % %ADFun%<% FunConstruct |
---|
55 | |
---|
56 | % %CPPAD_TESTVECTOR%(% testvector |
---|
57 | |
---|
58 | %.%Forward%(% Forward |
---|
59 | |
---|
60 | %CppAD::%Independent%(% Independent |
---|
61 | % %Independent%(% Independent |
---|
62 | |
---|
63 | %.%Jacobian%(% Jacobian |
---|
64 | |
---|
65 | %CppAD::%NearEqual%(% NearEqual |
---|
66 | % %NearEqual%(% NearEqual |
---|
67 | |
---|
68 | %.%Reverse%(% Reverse |
---|
69 | %$$ |
---|
70 | $spell |
---|
71 | Jax |
---|
72 | cppad.hpp |
---|
73 | cppad |
---|
74 | namespaces |
---|
75 | std |
---|
76 | templated |
---|
77 | const |
---|
78 | CppADvector |
---|
79 | multiplicative |
---|
80 | Microsoft |
---|
81 | bool |
---|
82 | Det |
---|
83 | namespace |
---|
84 | Cpp |
---|
85 | Var |
---|
86 | Diff |
---|
87 | initializes |
---|
88 | $$ |
---|
89 | |
---|
90 | , |
---|
91 | |
---|
92 | $comment bin/version assumes that : follows cppad version number here$$ |
---|
93 | $section |
---|
94 | cppad-20160318: A Package for Differentiation of C++ Algorithms |
---|
95 | $$ |
---|
96 | $mindex AD algorithmic differentiation automatic C++ algorithm derivative CppAD version cppad.hpp$$ |
---|
97 | |
---|
98 | $comment This comment is used to remove the table below$$ |
---|
99 | $table |
---|
100 | $cnext |
---|
101 | One section per web page $pre $$ $cnext |
---|
102 | All sections in one web page |
---|
103 | $rnext |
---|
104 | $cnext |
---|
105 | (fast to load) $pre $$ $cnext |
---|
106 | (slow to load) |
---|
107 | $rnext |
---|
108 | Math displayed using MathJax $pre $$ $cnext |
---|
109 | $href%cppad.htm%$$ |
---|
110 | $pre $$ $cnext |
---|
111 | $href%_printable.htm%$$ |
---|
112 | $rnext |
---|
113 | Math displayed using MathML $pre $$ $cnext |
---|
114 | $href%cppad.xml%$$ $pre $$ $cnext |
---|
115 | $href%_printable.xml%$$ |
---|
116 | $tend |
---|
117 | |
---|
118 | |
---|
119 | $head Syntax$$ |
---|
120 | $code # include <cppad/cppad.hpp>$$ |
---|
121 | |
---|
122 | $head Introduction$$ |
---|
123 | We refer to the |
---|
124 | step by step conversion from an algorithm that computes function values |
---|
125 | to an algorithm that computes derivative values |
---|
126 | as $italic Algorithmic Differentiation$$ |
---|
127 | (often referred to as $italic Automatic Differentiation$$.) |
---|
128 | Given a C++ algorithm that computes function values, |
---|
129 | CppAD generates an algorithm that computes its derivative values. |
---|
130 | A brief introduction to Algorithmic Differentiation can be found in |
---|
131 | $href%http://en.wikipedia.org/wiki/Automatic_differentiation%wikipedia%$$. |
---|
132 | The web site |
---|
133 | $href%http://www.autodiff.org%autodiff.org%$$ |
---|
134 | is dedicated to research about, and promoting the use of, AD. |
---|
135 | |
---|
136 | $list number$$ |
---|
137 | $href%http://www.coin-or.org/CppAD/%CppAD%$$ |
---|
138 | uses operator overloading to compute derivatives of algorithms defined in C++. |
---|
139 | It is distributed by the |
---|
140 | $href%http://www.coin-or.org/foundation.html%COIN-OR Foundation%$$ |
---|
141 | with the Eclipse Public License |
---|
142 | $href%http://www.opensource.org/licenses/EPL-1.0%EPL-1.0%$$ |
---|
143 | or the GNU General Public License |
---|
144 | $href%http://www.opensource.org/licenses/AGPL-3.0%GPL-3.0%$$. |
---|
145 | Testing and installation is supported for Unix, Microsoft, and Apple |
---|
146 | operating systems. |
---|
147 | Extensive user and developer documentation is included. |
---|
148 | |
---|
149 | $lnext |
---|
150 | An AD of $italic Base$$ |
---|
151 | $xref/glossary/Operation/Sequence/operation sequence/1/$$ |
---|
152 | is stored as an |
---|
153 | $xref/ADFun//AD function object/$$ |
---|
154 | which can evaluate function values and derivatives. |
---|
155 | Arbitrary order |
---|
156 | $xref/Forward//forward/$$ and $xref/Reverse//reverse/$$ |
---|
157 | mode derivative calculations |
---|
158 | can be preformed on the operation sequence. |
---|
159 | Logical comparisons can be included in an operation sequence |
---|
160 | using AD $xref/CondExp//conditional expressions/$$. |
---|
161 | Evaluation of user defined unary |
---|
162 | $xref/Discrete//discrete functions/$$ can also be included |
---|
163 | in the sequence of operations; i.e., |
---|
164 | functions that depend on the |
---|
165 | $cref/independent variables/glossary/Tape/Independent Variable/$$ |
---|
166 | but which have identically zero derivatives |
---|
167 | (e.g., a step function). |
---|
168 | |
---|
169 | $lnext |
---|
170 | Derivatives of functions that are defined in terms of other derivatives |
---|
171 | can be computed using multiple levels of AD; |
---|
172 | see $cref/mul_level.cpp/$$ for a simple example |
---|
173 | and $cref/mul_level_ode.cpp/$$ for a more realistic example. |
---|
174 | To this end, CppAD can also be used with other AD types; for example see |
---|
175 | $cref/mul_level_adolc_ode.cpp/$$. |
---|
176 | |
---|
177 | $lnext |
---|
178 | A set of programs for doing $cref/speed/$$ comparisons between |
---|
179 | $href%https://projects.coin-or.org/ADOL-C%Adolc%$$, |
---|
180 | CppAD, |
---|
181 | $href%http://www.fadbad.com/%Fadbad%$$, |
---|
182 | and |
---|
183 | $href%http://trilinos.sandia.gov/packages/sacado/%Sacado%$$ |
---|
184 | are included. |
---|
185 | |
---|
186 | |
---|
187 | $lnext |
---|
188 | Includes a set of C++ $cref/utilities/utility/$$ that are useful |
---|
189 | for general operator overloaded numerical method. |
---|
190 | Allows for replacement of the |
---|
191 | $cref/testvector/$$ |
---|
192 | template vector class which is used for extensive testing; |
---|
193 | for example, you can do your testing with the |
---|
194 | $href%http://www.boost.org/libs/numeric/ublas/doc/index.htm%uBlas%$$ |
---|
195 | template vector class. |
---|
196 | |
---|
197 | $lnext |
---|
198 | See $xref/whats_new/$$ for a list of recent extensions and bug fixes. |
---|
199 | |
---|
200 | $lend |
---|
201 | |
---|
202 | You can find out about other algorithmic differentiation tools |
---|
203 | and about algorithmic differentiation in general at the following web sites: |
---|
204 | $href%http://en.wikipedia.org/wiki/Automatic_differentiation%wikipedia%$$, |
---|
205 | $href%http://www.autodiff.org%autodiff.org%$$. |
---|
206 | |
---|
207 | $head Example$$ |
---|
208 | The file |
---|
209 | $xref/get_started.cpp/$$ |
---|
210 | contains an example and test of using CppAD to compute |
---|
211 | the derivative of a polynomial. |
---|
212 | There are many other |
---|
213 | $xref/Example//examples/$$. |
---|
214 | |
---|
215 | $head Include File$$ |
---|
216 | The following include directive |
---|
217 | $syntax% |
---|
218 | # include <cppad/cppad.hpp> |
---|
219 | %$$ |
---|
220 | includes the CppAD package for the rest of the current compilation unit. |
---|
221 | |
---|
222 | $head Preprocessor Symbols$$ |
---|
223 | All the $cref preprocessor$$ symbols used by CppAD begin with eight |
---|
224 | $code CppAD$$ or $code CPPAD_$$. |
---|
225 | |
---|
226 | $head Namespace$$ |
---|
227 | All of the functions and objects defined by CppAD are in the |
---|
228 | $code CppAD$$ namespace; for example, you can access the $xref/AD/$$ types as |
---|
229 | $syntax% |
---|
230 | size_t n = 2; |
---|
231 | CppAD::vector< CppAD::AD<%Base%> > %x%(%n%) |
---|
232 | %$$ |
---|
233 | You can abbreviate access to one object or function a $code using$$ |
---|
234 | command of the form |
---|
235 | $syntax% |
---|
236 | using CppAD::AD |
---|
237 | CppAD::vector< AD<%Base%> > %x%(%n%) |
---|
238 | %$$ |
---|
239 | You can abbreviate access to all CppAD objects and functions |
---|
240 | with a command of the form |
---|
241 | $syntax% |
---|
242 | using namespace CppAD |
---|
243 | vector< AD<%Base%> > %x%(%n%) |
---|
244 | %$$ |
---|
245 | If you include other namespaces in a similar manner, |
---|
246 | this can cause naming conflicts. |
---|
247 | |
---|
248 | |
---|
249 | $childtable% |
---|
250 | omh/install/install.omh% |
---|
251 | omh/introduction.omh% |
---|
252 | cppad/local/user_ad.hpp% |
---|
253 | cppad/local/ad_fun.hpp% |
---|
254 | omh/preprocessor.omh% |
---|
255 | omh/multi_thread.omh% |
---|
256 | omh/utility.omh% |
---|
257 | cppad/ipopt/solve.hpp% |
---|
258 | omh/example.omh% |
---|
259 | omh/speed/speed.omh% |
---|
260 | omh/appendix.omh |
---|
261 | %$$ |
---|
262 | |
---|
263 | $end |
---|