source: stable/20130000/doc.omh @ 2757

Last change on this file since 2757 was 2757, checked in by bradbell, 7 years ago
  1. Relevant part of bug fix to limits.cpp in trunk

between revision 2755 and 2756.

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