source: trunk/doc.omh @ 3071

Last change on this file since 3071 was 2897, checked in by bradbell, 7 years ago
  1. Add a minimal atomic example called example/atomic/get_started.cpp.
  2. Advance version number in source to today.

optimize.hpp: Avoid warning with signed address type (used for testing).
atomic_base.hpp: Fix documentation, only zero order forward required.
reciprocal.cpp: fix spelling of now.
reverse.hpp: Fix bug in checking for nan during reverse mode.

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