source: trunk/doc.omh @ 3938

Last change on this file since 3938 was 3938, checked in by bradbell, 2 years ago

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 78ba7f801a6fec0dbdaa887c01ea58a9ccb59817
end hash code: bd9a72f2ccec67a9773cd2ecd536df8fe09860da

commit bd9a72f2ccec67a9773cd2ecd536df8fe09860da
Author: Brad Bell <bradbell@…>
Date: Mon May 22 06:14:34 2017 -0700

  1. Add the cppad_extra_debug option to cmake command.
  2. Advance to cppad-20170522.

commit 8f832650db029dd1df2f302b3e6a7f39cb83078f
Author: Brad Bell <bradbell@…>
Date: Sun May 21 07:16:35 2017 -0700

CMakeLists.txt: change type of cppad_deprecated to BOOL (must be NO).
configure.hpp.in: fix comment about CPPAD_DEPRECATED.
ad_ctor.hpp: remove comment about old use of cppad_deprecated.
cmake.omh: remove description of old deprecated case.

commit 9a0a0705f7c44e5a93c136c3bd1e56ab39bb809f
Author: Brad Bell <bradbell@…>
Date: Sun May 21 06:34:38 2017 -0700

Add test that fails when release.cpp is compiled for release.
CMakeLists.txt: improve command line argument comments.

commit bfbc481d68256d71217a1d9a439bc2b2e07f90c2
Author: Brad Bell <bradbell@…>
Date: Sun May 21 04:15:26 2017 -0700

Advance to cppad-20170521.
check_example.sh: simplify.

commit 163044ceea186505229e59770b263fe00b12726d
Author: Brad Bell <bradbell@…>
Date: Sat May 20 09:07:15 2017 -0700

Create test_more/debug_rel (Under construction).

commit 9d90a176a0fc75faff28c0cb2034218d8a3b2f6a
Author: Brad Bell <bradbell@…>
Date: Sat May 20 07:04:52 2017 -0700

readme.md: add link to new directory structure page.

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