File: doc.omh

package info (click to toggle)
cppad 2017.00.00.4-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 26,780 kB
  • ctags: 12,220
  • sloc: xml: 216,822; cpp: 63,586; sh: 9,233; makefile: 1,321; python: 637; ansic: 170
file content (262 lines) | stat: -rw-r--r-- 7,622 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell

CppAD is distributed under multiple licenses. This distribution is under
the terms of the
                    GNU General Public License Version 3.

A copy of this license is included in the COPYING file of this distribution.
Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
-------------------------------------------------------------------------- */
$begin CppAD$$
$comment default navigate command for all of CppAD documentation$$
$navigate%
	Prev%Prev%
	Next%Next%
	Across%Index%
	Up%Up%
	Down_up_3%_up_3%
	Down_up_2%_up_2%
	Down_up_1%_up_1%
	Down_up_0%_up_0%
	Current%Headings
%$$
$comment -------------------------------------------------------------
default automatic indexing command for all CppAD documentaiton
$$
$aindex section head subhead$$
$comment -------------------------------------------------------------
Latex used throughout the CppAD documentation
$$
$latex
\newcommand{\W}[1]{ \; #1 \; }
\newcommand{\R}[1]{ {\rm #1} }
\newcommand{\B}[1]{ {\bf #1} }
\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }
\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }
\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial  {#2}^{#1}} }
\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }
$$
$comment -------------------------------------------------------------
hilite commands used throughout the CppAD documentation
$$
$hilitecmd%
	verbatim%
	codep
%$$
$hiliteseq%

 CppAD::%AD%<%                AD
%       %AD%<%                AD

%CppAD::%ADFun%<%             FunConstruct
%       %ADFun%<%             FunConstruct

%       %CPPAD_TESTVECTOR%(% testvector

      %.%Forward%(%           Forward

%CppAD::%Independent%(%       Independent
%       %Independent%(%       Independent

      %.%Jacobian%(%          Jacobian

%CppAD::%NearEqual%(%         NearEqual
%       %NearEqual%(%         NearEqual

      %.%Reverse%(%           Reverse
%$$
$spell
	Jax
	cppad.hpp
	cppad
	namespaces
	std
	templated
	const
	CppADvector
	multiplicative
	Microsoft
	bool
	Det
	namespace
	Cpp
	Var
	Diff
	initializes
$$

,

$comment bin/version assumes that : follows cppad version number here$$
$section
cppad-20170000.4: A Package for Differentiation of C++ Algorithms
$$
$mindex AD algorithmic differentiation automatic C++ algorithm derivative CppAD version cppad.hpp$$

$comment This comment is used to remove the table below$$
$table
$cnext
	One section per web page $pre  $$ $cnext
	All sections in one web page
$rnext
$cnext
	(fast to load) $pre  $$ $cnext
	(slow to load)
$rnext
Math displayed using MathJax $pre  $$ $cnext
$href%cppad.htm%$$
$pre  $$ $cnext
$href%_printable.htm%$$
$rnext
Math displayed using MathML $pre  $$ $cnext
$href%cppad.xml%$$ $pre  $$ $cnext
$href%_printable.xml%$$
$tend


$head Syntax$$
$code # include <cppad/cppad.hpp>$$

$head Introduction$$
We refer to the
step by step conversion from an algorithm that computes function values
to an algorithm that computes derivative values
as $italic Algorithmic Differentiation$$
(often referred to as $italic Automatic Differentiation$$.)
Given a C++ algorithm that computes function values,
CppAD generates an algorithm that computes its derivative values.
A brief introduction to Algorithmic Differentiation can be found in
$href%http://en.wikipedia.org/wiki/Automatic_differentiation%wikipedia%$$.
The web site
$href%http://www.autodiff.org%autodiff.org%$$
is dedicated to research about, and promoting the use of, AD.

$list number$$
$href%http://www.coin-or.org/CppAD/%CppAD%$$
uses operator overloading to compute derivatives of algorithms defined in C++.
It is distributed by the
$href%http://www.coin-or.org/foundation.html%COIN-OR Foundation%$$
with the Eclipse Public License
$href%http://www.opensource.org/licenses/EPL-1.0%EPL-1.0%$$
or the GNU General Public License
$href%http://www.opensource.org/licenses/AGPL-3.0%GPL-3.0%$$.
Testing and installation is supported for Unix, Microsoft, and Apple
operating systems.
Extensive user and developer documentation is included.

$lnext
An AD of $italic Base$$
$xref/glossary/Operation/Sequence/operation sequence/1/$$
is stored as an
$xref/ADFun//AD function object/$$
which can evaluate function values and derivatives.
Arbitrary order
$xref/Forward//forward/$$ and $xref/Reverse//reverse/$$
mode derivative calculations
can be preformed on the operation sequence.
Logical comparisons can be included in an operation sequence
using AD $xref/CondExp//conditional expressions/$$.
Evaluation of user defined unary
$xref/Discrete//discrete functions/$$ can also be included
in the sequence of operations; i.e.,
functions that depend on the
$cref/independent variables/glossary/Tape/Independent Variable/$$
but which have identically zero derivatives
(e.g., a step function).

$lnext
Derivatives of functions that are defined in terms of other derivatives
can be computed using multiple levels of AD;
see $cref/mul_level.cpp/$$ for a simple example
and $cref/mul_level_ode.cpp/$$ for a more realistic example.
To this end, CppAD can also be used with other AD types; for example see
$cref/mul_level_adolc_ode.cpp/$$.

$lnext
A set of programs for doing $cref/speed/$$ comparisons between
$href%https://projects.coin-or.org/ADOL-C%Adolc%$$,
CppAD,
$href%http://www.fadbad.com/%Fadbad%$$,
and
$href%http://trilinos.sandia.gov/packages/sacado/%Sacado%$$
are included.


$lnext
Includes a set of C++ $cref/utilities/utility/$$ that are useful
for general operator overloaded numerical method.
Allows for replacement of the
$cref/testvector/$$
template vector class which is used for extensive testing;
for example, you can do your testing with the
$href%http://www.boost.org/libs/numeric/ublas/doc/index.htm%uBlas%$$
template vector class.

$lnext
See $xref/whats_new/$$ for a list of recent extensions and bug fixes.

$lend

You can find out about other algorithmic differentiation tools
and about algorithmic differentiation in general at the following web sites:
$href%http://en.wikipedia.org/wiki/Automatic_differentiation%wikipedia%$$,
$href%http://www.autodiff.org%autodiff.org%$$.

$head Example$$
The file
$xref/get_started.cpp/$$
contains an example and test of using CppAD to compute
the derivative of a polynomial.
There are many other
$xref/Example//examples/$$.

$head Include File$$
The following include directive
$syntax%
	# include <cppad/cppad.hpp>
%$$
includes the CppAD package for the rest of the current compilation unit.

$head Preprocessor Symbols$$
All the $cref preprocessor$$ symbols used by CppAD begin with eight
$code CppAD$$ or $code CPPAD_$$.

$head Namespace$$
All of the functions and objects defined by CppAD are in the
$code CppAD$$ namespace; for example, you can access the $xref/AD/$$ types as
$syntax%
	size_t n = 2;
	CppAD::vector< CppAD::AD<%Base%> > %x%(%n%)
%$$
You can abbreviate access to one object or function a $code using$$
command of the form
$syntax%
	using CppAD::AD
	CppAD::vector< AD<%Base%> > %x%(%n%)
%$$
You can abbreviate access to all CppAD objects and functions
with a command of the form
$syntax%
	using namespace CppAD
	vector< AD<%Base%> > %x%(%n%)
%$$
If you include other namespaces in a similar manner,
this can cause naming conflicts.


$childtable%
	omh/install/install.omh%
	omh/introduction.omh%
	cppad/core/user_ad.hpp%
	cppad/core/ad_fun.hpp%
	omh/preprocessor.omh%
	omh/multi_thread.omh%
	omh/utility.omh%
	cppad/ipopt/solve.hpp%
	omh/example.omh%
	omh/speed/speed.omh%
	omh/appendix.omh
%$$

$end