Codebase list cppad / upstream/2015.00.00.7 doc / glossary.xml
upstream/2015.00.00.7

Tree @upstream/2015.00.00.7 (Download .tar.gz)

glossary.xml @upstream/2015.00.00.7raw · history · blame

  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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>Glossary</title>
<meta http-equiv='Content-Type' content='text/html' charset='utf-8'/>
<meta name="description" id="description" content="Glossary"/>
<meta name="keywords" id="keywords" content=" ad function of base levels above level Ad type elementary vector operation atomic sequence dependent independent parameter sparsity pattern efficient boolean sets tape active inactive variable variables taylor coefficient "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_glossary_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="reverse_identity.xml" target="_top">Prev</a>
</td><td><a href="bib.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>Appendix</option>
<option>glossary</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>Appendix-&gt;</option>
<option>Faq</option>
<option>Theory</option>
<option>glossary</option>
<option>Bib</option>
<option>Bugs</option>
<option>WishList</option>
<option>whats_new</option>
<option>deprecated</option>
<option>compare_c</option>
<option>License</option>
</select>
</td>
<td>glossary</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>AD Function</option>
<option>AD of Base</option>
<option>AD Levels Above Base</option>
<option>Base Function</option>
<option>Base Type</option>
<option>Elementary Vector</option>
<option>Operation</option>
<option>---..Atomic</option>
<option>---..Sequence</option>
<option>---..Dependent</option>
<option>---..Independent</option>
<option>Parameter</option>
<option>Sparsity Pattern</option>
<option>---..Vector of Boolean</option>
<option>---..Vector of Sets</option>
<option>Tape</option>
<option>---..Active</option>
<option>---..Inactive</option>
<option>---..Independent Variable</option>
<option>---..Dependent Variables</option>
<option>Taylor Coefficient</option>
<option>Variable</option>
</select>
</td>
</tr></table><br/>




<center><b><big><big>Glossary</big></big></b></center>
<br/>
<b><big><a name="AD Function" id="AD Function">AD Function</a></big></b>
<br/>
Given an <a href="adfun.xml" target="_top"><span style='white-space: nowrap'>ADFun</span></a>
 object 
<code><i><font color="black"><span style='white-space: nowrap'>f</span></font></i></code>

there is a corresponding
AD of 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 <a href="glossary.xml#Operation.Sequence" target="_top"><span style='white-space: nowrap'>operation&#xA0;sequence</span></a>
.
This operation sequence
defines a function 

<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>F</mi>
<mo stretchy="false">:</mo>
<msup><mi mathvariant='italic'>B</mi>
<mi mathvariant='italic'>n</mi>
</msup>
<mo stretchy="false">&#x02192;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mi mathvariant='italic'>m</mi>
</msup>
</mrow></math>


where 
<code><i><font color="black"><span style='white-space: nowrap'>B</span></font></i></code>
 is the space corresponding to objects of type 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
,

<code><i><font color="black"><span style='white-space: nowrap'>n</span></font></i></code>
 is the size of the <a href="seq_property.xml#Domain" target="_top"><span style='white-space: nowrap'>domain</span></a>
 space, and

<code><i><font color="black"><span style='white-space: nowrap'>m</span></font></i></code>
 is the size of the <a href="seq_property.xml#Range" target="_top"><span style='white-space: nowrap'>range</span></a>
 space.
We refer to 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>F</mi>
</mrow></math>

 as the AD function corresponding to 
the operation sequence stored in the object 
<code><i><font color="black"><span style='white-space: nowrap'>f</span></font></i></code>
.
(See the <a href="funcheck.xml#Discussion" target="_top"><span style='white-space: nowrap'>FunCheck&#xA0;discussion</span></a>
 for
possible differences between 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>F</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>x</mi>
<mo stretchy="false">)</mo>
</mrow></math>

 and the algorithm that defined
the operation sequence.)

<br/>
<br/>
<b><big><a name="AD of Base" id="AD of Base">AD of Base</a></big></b>
<br/>
An object is called an AD of 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 object its type is 
either 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 
(see the default and copy <a href="ad_ctor.xml" target="_top"><span style='white-space: nowrap'>constructors</span></a>
 
or 
<code><font color="blue"><span style='white-space: nowrap'>VecAD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;::reference</span></font></code>
 (see <a href="vecad.xml" target="_top"><span style='white-space: nowrap'>VecAD</span></a>
)
for some 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 type.

<br/>
<br/>
<b><big><a name="AD Levels Above Base" id="AD Levels Above Base">AD Levels Above Base</a></big></b>


<br/>
If 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 is a type, 
the AD levels above 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 
is the following sequence of types:

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>,</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;AD&lt;&#xA0;AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;&#xA0;&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>,</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;AD&lt;&#xA0;AD&lt;&#xA0;AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;&#xA0;&gt;&#xA0;&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>,</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>...</span></font></i><font color="blue"><span style='white-space: nowrap'><br/>
</span></font></code>
<br/>
<b><big><a name="Base Function" id="Base Function">Base Function</a></big></b>
<br/>
A function 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>f</mi>
<mo stretchy="false">:</mo>
<mi mathvariant='italic'>B</mi>
<mo stretchy="false">&#x02192;</mo>
<mi mathvariant='italic'>B</mi>
</mrow></math>

 
is referred to as a 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 function,
if 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 is a C++ type that represent elements of
the domain and range space of 
<code><i><font color="black"><span style='white-space: nowrap'>f</span></font></i></code>
; i.e. elements of 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>B</mi>
</mrow></math>

.

<br/>
<br/>
<b><big><a name="Base Type" id="Base Type">Base Type</a></big></b>
<br/>
If 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 is an 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 object,

<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 is referred to as the base type for 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
.

<br/>
<br/>
<b><big><a name="Elementary Vector" id="Elementary Vector">Elementary Vector</a></big></b>
<br/>
The <code><i>j</i></code>-th elementary vector 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<msup><mi mathvariant='italic'>e</mi>
<mi mathvariant='italic'>j</mi>
</msup>
<mo stretchy="false">&#x02208;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mi mathvariant='italic'>m</mi>
</msup>
</mrow></math>

 is defined by

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msubsup><mi mathvariant='italic'>e</mi>
<mi mathvariant='italic'>i</mi>
<mi mathvariant='italic'>j</mi>
</msubsup>
<mo stretchy="false">=</mo>
<mrow><mo stretchy="true">{</mo><mrow><mtable rowalign="center" ><mtr><mtd columnalign="left" >
<mn>1</mn>
</mtd><mtd columnalign="left" >
<mrow><mstyle mathvariant='normal'><mi mathvariant='normal'>if</mi>
</mstyle></mrow>
<mspace width='.3em'/>
<mi mathvariant='italic'>i</mi>
<mo stretchy="false">=</mo>
<mi mathvariant='italic'>j</mi>
</mtd></mtr><mtr><mtd columnalign="left" >
<mn>0</mn>
</mtd><mtd columnalign="left" >
<mrow><mstyle mathvariant='normal'><mi mathvariant='normal'>otherwise</mi>
</mstyle></mrow>
</mtd></mtr></mtable>
</mrow><mo stretchy="true"> </mo></mrow>
</mrow></math>

<br/>
<b><big><a name="Operation" id="Operation">Operation</a></big></b>


<br/>
<br/>
<b><a name="Operation.Atomic" id="Operation.Atomic">Atomic</a></b>
<br/>
An atomic 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operation is an operation that
has a 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 result and is not made up of other
more basic operations.

<br/>
<br/>
<b><a name="Operation.Sequence" id="Operation.Sequence">Sequence</a></b>
<br/>
A sequence of atomic 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operations 
is called a 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operation sequence.
A sequence of atomic <a href="glossary.xml#AD of Base" target="_top"><span style='white-space: nowrap'>AD&#xA0;of&#xA0;Base</span></a>
 operations
is referred to as an AD of 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 operation sequence.
The abbreviated notation AD operation sequence is often used
when it is not necessary to specify the base type.

<br/>
<br/>
<b><a name="Operation.Dependent" id="Operation.Dependent">Dependent</a></b>
<br/>
Suppose that 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>
 are 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 objects and
the result of 

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&lt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'><br/>
</span></font></code>
has type <code><font color="blue">bool</font></code> (where 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 is not the same as <code><font color="blue">bool</font></code>).
If one executes the following code

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;if(&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&lt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;)<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;cos(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;else&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;sin(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>);&#xA0;<br/>
</span></font></code>
the choice above depends on the value of 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>

and the two choices result in a different 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operation sequence.
In this case, we say that the 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operation sequence depends
on 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>
.

<br/>
<br/>
<b><a name="Operation.Independent" id="Operation.Independent">Independent</a></b>
<br/>
Suppose that 
<code><i><font color="black"><span style='white-space: nowrap'>i</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>n</span></font></i></code>
 are <code><font color="blue">size_t</font></code> objects,
and 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>[</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>]</span></font></code>
, 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>
 are 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 objects,
where 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 is different from <code><font color="blue">size_t</font></code>.
The 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 sequence of operations corresponding to

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i><font color="blue"><span style='white-space: nowrap'>(0);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;for(</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;&lt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>n</span></font></i><font color="blue"><span style='white-space: nowrap'>;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>++)<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;+=&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>[</span></font><i><font color="black"><span style='white-space: nowrap'>i</span></font></i><font color="blue"><span style='white-space: nowrap'>];<br/>
</span></font></code>
does not depend on the value of 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 or 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>
.
In this case, we say that the 
<code><i><font color="black"><span style='white-space: nowrap'>Type</span></font></i></code>
 operation sequence 
is independent of 
<code><i><font color="black"><span style='white-space: nowrap'>y</span></font></i></code>
 and the elements of 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
.

<br/>
<br/>
<b><big><a name="Parameter" id="Parameter">Parameter</a></big></b>
<br/>
All 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 objects are parameters.
An 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 object 
<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
 is currently a parameter if
its value does not depend on the value of 
an <a href="independent.xml" target="_top"><span style='white-space: nowrap'>Independent</span></a>
 variable vector for an
<a href="glossary.xml#Tape.Active" target="_top"><span style='white-space: nowrap'>active&#xA0;tape</span></a>
.
If 
<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
 is a parameter, the function 
<a href="parvar.xml" target="_top"><span style='white-space: nowrap'>Parameter(u)</span></a>
 returns true
and <a href="parvar.xml" target="_top"><span style='white-space: nowrap'>Variable(u)</span></a>
 returns false.

<br/>
<br/>
<b><big><a name="Sparsity Pattern" id="Sparsity Pattern">Sparsity Pattern</a></big></b>



<br/>
CppAD describes a sparse matrix as a vector of sets with each
vector component corresponding to a row 
and the elements of the set corresponding to the possibly non-zero columns.
A vector of <code><font color="blue">bool</font></code>
can represent a vector of sets using one bit per element.
(Some vectors of <code><font color="blue">bool</font></code> use one byte per element but
<a href="cppad_vector.xml#vectorBool" target="_top"><span style='white-space: nowrap'>vectorBool</span></a>
 is an example class that
uses one bit per element.)
The problem is that this representation uses one bit for both the elements 
that are there and the ones that are not.
<code><span style='white-space: nowrap'><br/>
<br/>
</span></code>A vector of <code><font color="blue">std::set&lt;size_t&gt;</font></code> does not
represent the elements that are not present,
but it uses about three <code><font color="blue">size_t</font></code> values
for each element that is present.
For example, if <code><font color="blue">size_t</font></code> uses 32 bits, 
a vector of <code><font color="blue">std::set&lt;size_t&gt;</font></code> uses
about 100 bits for each element that is present in the 
vector of sets.
Thus, a vector of <code><font color="blue">std::set&lt;size_t&gt;</font></code> should be more efficient for 
very sparse matrix representations.

<br/>
<br/>
<b><a name="Sparsity Pattern.Vector of Boolean" id="Sparsity Pattern.Vector of Boolean">Vector of Boolean</a></b>
<br/>
Given a matrix 

<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
<mo stretchy="false">&#x02208;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mrow><mi mathvariant='italic'>m</mi>
<mo stretchy="false">&#x000D7;</mo>
<mi mathvariant='italic'>n</mi>
</mrow>
</msup>
</mrow></math>

,
a vector of <code><font color="blue">bool</font></code> 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>B</mi>
</mrow></math>

 of length 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>m</mi>
<mo stretchy="false">&#x000D7;</mo>
<mi mathvariant='italic'>n</mi>
</mrow></math>

 
is a sparsity pattern for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

 if 
for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>i</mi>
<mo stretchy="false">=</mo>
<mn>0</mn>
<mo stretchy="false">,</mo>
<mo stretchy="false">&#x02026;</mo>
<mo stretchy="false">,</mo>
<mi mathvariant='italic'>m</mi>
<mn>-1</mn>
</mrow></math>

 and 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>j</mi>
<mo stretchy="false">=</mo>
<mn>0</mn>
<mo stretchy="false">,</mo>
<mo stretchy="false">&#x02026;</mo>
<mi mathvariant='italic'>n</mi>
<mn>-1</mn>
</mrow></math>

,

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msub><mi mathvariant='italic'>A</mi>
<mrow><mi mathvariant='italic'>i</mi>
<mo stretchy="false">,</mo>
<mi mathvariant='italic'>j</mi>
</mrow>
</msub>
<mo stretchy="false">&#x02260;</mo>
<mn>0</mn>
<mspace width='.3em'/>
<mo stretchy="false">&#x021D2;</mo>
<mspace width='.3em'/>
<msub><mi mathvariant='italic'>B</mi>
<mrow><mi mathvariant='italic'>i</mi>
<mo stretchy="false">*</mo>
<mi mathvariant='italic'>n</mi>
<mo stretchy="false">+</mo>
<mi mathvariant='italic'>j</mi>
</mrow>
</msub>
<mo stretchy="false">=</mo>
<mrow><mstyle mathvariant='normal'><mi mathvariant='normal'>true</mi>
</mstyle></mrow>
</mrow></math>

Given two sparsity patterns 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>B</mi>
</mrow></math>

 and 
<code><i><font color="black"><span style='white-space: nowrap'>C</span></font></i></code>
 
for a matrix 
<code><i><font color="black"><span style='white-space: nowrap'>A</span></font></i></code>
, we say that 
<code><i><font color="black"><span style='white-space: nowrap'>B</span></font></i></code>
 is more efficient than

<code><i><font color="black"><span style='white-space: nowrap'>C</span></font></i></code>
 if 
<code><i><font color="black"><span style='white-space: nowrap'>B</span></font></i></code>
 has fewer true elements than 
<code><i><font color="black"><span style='white-space: nowrap'>C</span></font></i></code>
.
For example, if 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

 is the identity matrix,

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msub><mi mathvariant='italic'>B</mi>
<mrow><mi mathvariant='italic'>i</mi>
<mo stretchy="false">*</mo>
<mi mathvariant='italic'>n</mi>
<mo stretchy="false">+</mo>
<mi mathvariant='italic'>j</mi>
</mrow>
</msub>
<mo stretchy="false">=</mo>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>i</mi>
<mo stretchy="false">=</mo>
<mi mathvariant='italic'>j</mi>
<mo stretchy="false">)</mo>
</mrow></math>

defines an efficient sparsity pattern for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

.

<br/>
<br/>
<b><a name="Sparsity Pattern.Vector of Sets" id="Sparsity Pattern.Vector of Sets">Vector of Sets</a></b>
<br/>
Given a matrix 

<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
<mo stretchy="false">&#x02208;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mrow><mi mathvariant='italic'>m</mi>
<mo stretchy="false">&#x000D7;</mo>
<mi mathvariant='italic'>n</mi>
</mrow>
</msup>
</mrow></math>

,
a vector of sets 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>S</mi>
</mrow></math>

 of length 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>m</mi>
</mrow></math>

 is a 
sparsity pattern for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

 if 
for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>i</mi>
<mo stretchy="false">=</mo>
<mn>0</mn>
<mo stretchy="false">,</mo>
<mo stretchy="false">&#x02026;</mo>
<mo stretchy="false">,</mo>
<mi mathvariant='italic'>m</mi>
<mn>-1</mn>
</mrow></math>

 

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msub><mi mathvariant='italic'>A</mi>
<mrow><mi mathvariant='italic'>i</mi>
<mo stretchy="false">,</mo>
<mi mathvariant='italic'>j</mi>
</mrow>
</msub>
<mo stretchy="false">&#x02260;</mo>
<mn>0</mn>
<mspace width='.3em'/>
<mo stretchy="false">&#x021D2;</mo>
<mspace width='.3em'/>
<mi mathvariant='italic'>j</mi>
<mo stretchy="false">&#x02208;</mo>
<msub><mi mathvariant='italic'>S</mi>
<mi mathvariant='italic'>i</mi>
</msub>
</mrow></math>

Given two sparsity patterns 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>S</mi>
</mrow></math>

 and 
<code><i><font color="black"><span style='white-space: nowrap'>T</span></font></i></code>
 
for a matrix 
<code><i><font color="black"><span style='white-space: nowrap'>A</span></font></i></code>
, we say that 
<code><i><font color="black"><span style='white-space: nowrap'>S</span></font></i></code>
 is more efficient than

<code><i><font color="black"><span style='white-space: nowrap'>T</span></font></i></code>
 if 
<code><i><font color="black"><span style='white-space: nowrap'>S</span></font></i></code>
 has fewer elements than 
<code><i><font color="black"><span style='white-space: nowrap'>T</span></font></i></code>
.
For example, if 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

 is the identity matrix,

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msub><mi mathvariant='italic'>S</mi>
<mi mathvariant='italic'>i</mi>
</msub>
<mo stretchy="false">=</mo>
<mo stretchy="false">{</mo>
<mi mathvariant='italic'>i</mi>
<mo stretchy="false">}</mo>
</mrow></math>

defines an efficient sparsity pattern for 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>A</mi>
</mrow></math>

.

<br/>
<br/>
<b><big><a name="Tape" id="Tape">Tape</a></big></b>


<br/>
<br/>
<b><a name="Tape.Active" id="Tape.Active">Active</a></b>
<br/>
A new tape is created and becomes active 
after each call of the form (see <a href="independent.xml" target="_top"><span style='white-space: nowrap'>Independent</span></a>
)

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;Independent(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>)<br/>
</span></font></code>
All operations that depend on the elements of 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 are
recorded on this active tape.

<br/>
<br/>
<b><a name="Tape.Inactive" id="Tape.Inactive">Inactive</a></b>
<br/>
The
<a href="glossary.xml#Operation.Sequence" target="_top"><span style='white-space: nowrap'>operation&#xA0;sequence</span></a>

stored in a tape must be transferred to a function object using the syntax
(see <a href="funconstruct.xml" target="_top"><span style='white-space: nowrap'>ADFun&lt;Base&gt;&#xA0;f(x,&#xA0;y)</span></a>
)

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;ADFun&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>f</span></font></i><font color="blue"><span style='white-space: nowrap'>(&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>)<br/>
</span></font></code>
or using the syntax (see <a href="dependent.xml" target="_top"><span style='white-space: nowrap'>f.Dependent(x,&#xA0;y)</span></a>
)

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>f</span></font></i><font color="blue"><span style='white-space: nowrap'>.Dependent(&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>y</span></font></i><font color="blue"><span style='white-space: nowrap'>)<br/>
</span></font></code>
After such a transfer, the tape becomes inactive.

<br/>
<br/>
<b><a name="Tape.Independent Variable" id="Tape.Independent Variable">Independent Variable</a></b>
<br/>
While the tape is active, we refer to the elements of 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 
as the independent variables for the tape.
When the tape becomes inactive,
the corresponding objects become 
<a href="glossary.xml#Parameter" target="_top"><span style='white-space: nowrap'>parameters</span></a>
.

<br/>
<br/>
<b><a name="Tape.Dependent Variables" id="Tape.Dependent Variables">Dependent Variables</a></b>
<br/>
While the tape is active, we use the term dependent variables for the tape
for any objects whose value depends on the independent variables for the tape.
When the tape becomes inactive,
the corresponding objects become 
<a href="glossary.xml#Parameter" target="_top"><span style='white-space: nowrap'>parameters</span></a>
.

 
<br/>
<br/>
<b><big><a name="Taylor Coefficient" id="Taylor Coefficient">Taylor Coefficient</a></big></b>
<br/>
Suppose 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>X</mi>
<mo stretchy="false">:</mo>
<mi mathvariant='italic'>B</mi>
<mo stretchy="false">&#x02192;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mi mathvariant='italic'>n</mi>
</msup>
</mrow></math>

 is a 
is 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>p</mi>
</mrow></math>

 times continuously differentiable function
in some neighborhood of zero.
For 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>k</mi>
<mo stretchy="false">=</mo>
<mn>0</mn>
<mo stretchy="false">,</mo>
<mo stretchy="false">&#x02026;</mo>
<mo stretchy="false">,</mo>
<mi mathvariant='italic'>p</mi>
</mrow></math>

, 
we use the column vector 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<msup><mi mathvariant='italic'>x</mi>
<mrow><mo stretchy="false">(</mo>
<mi mathvariant='italic'>k</mi>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<mo stretchy="false">&#x02208;</mo>
<msup><mi mathvariant='italic'>B</mi>
<mi mathvariant='italic'>n</mi>
</msup>
</mrow></math>

 for the <code><i>k</i></code>-th order 
Taylor coefficient corresponding to 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>X</mi>
</mrow></math>

 
which is defined by

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<msup><mi mathvariant='italic'>x</mi>
<mrow><mo stretchy="false">(</mo>
<mi mathvariant='italic'>k</mi>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<mo stretchy="false">=</mo>
<mfrac><mrow><mn>1</mn>
</mrow>
<mrow><mi mathvariant='italic'>k</mi>
<mo stretchy="false">!</mo>
</mrow>
</mfrac>
<mfrac><mrow><msup><mo stretchy="false">&#x02202;</mo>
<mrow><mi mathvariant='italic'>k</mi>
</mrow>
</msup>
</mrow>
<mrow><mo stretchy="false">&#x02202;</mo>
<msup><mrow><mi mathvariant='italic'>t</mi>
</mrow>
<mrow><mi mathvariant='italic'>k</mi>
</mrow>
</msup>
</mrow>
</mfrac>
<mi mathvariant='italic'>X</mi>
<mo stretchy="false">(</mo>
<mn>0</mn>
<mo stretchy="false">)</mo>
</mrow></math>

It follows that 

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow>
<mi mathvariant='italic'>X</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>t</mi>
<mo stretchy="false">)</mo>
<mo stretchy="false">=</mo>
<msup><mi mathvariant='italic'>x</mi>
<mrow><mo stretchy="false">(</mo>
<mn>0</mn>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<msup><mi mathvariant='italic'>x</mi>
<mrow><mo stretchy="false">(</mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<mi mathvariant='italic'>t</mi>
<mo stretchy="false">+</mo>
<mo stretchy="false">&#x022EF;</mo>
<mo stretchy="false">+</mo>
<msup><mi mathvariant='italic'>x</mi>
<mrow><mo stretchy="false">(</mo>
<mi mathvariant='italic'>p</mi>
<mo stretchy="false">)</mo>
</mrow>
</msup>
<msup><mi mathvariant='italic'>t</mi>
<mi mathvariant='italic'>p</mi>
</msup>
<mo stretchy="false">+</mo>
<mi mathvariant='italic'>R</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>t</mi>
<mo stretchy="false">)</mo>
</mrow></math>

where the remainder 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>R</mi>
<mo stretchy="false">(</mo>
<mi mathvariant='italic'>t</mi>
<mo stretchy="false">)</mo>
</mrow></math>

 divided by 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<msup><mi mathvariant='italic'>t</mi>
<mi mathvariant='italic'>p</mi>
</msup>
</mrow></math>

 
converges to zero and 
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow>
<mi mathvariant='italic'>t</mi>
</mrow></math>

 goes to zero.


<br/>
<br/>
<b><big><a name="Variable" id="Variable">Variable</a></big></b>
<br/>
An 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 object 
<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
 is a variable if
its value depends on an independent variable vector for
a currently <a href="glossary.xml#Tape.Active" target="_top"><span style='white-space: nowrap'>active&#xA0;tape</span></a>
.
If 
<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
 is a variable,
<a href="parvar.xml" target="_top"><span style='white-space: nowrap'>Variable(u)</span></a>
 returns true and 
<a href="parvar.xml" target="_top"><span style='white-space: nowrap'>Parameter(u)</span></a>
 returns false. 
For example,
directly after the code sequence

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;Independent(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;AD&lt;double&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>u</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>[0];<br/>
</span></font></code>
the 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;double&gt;</span></font></code>
 object 
<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
 is currently a variable.
Directly after the code sequence

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;Independent(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>);<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;AD&lt;double&gt;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>u</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>[0];<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>u</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;5;<br/>
</span></font></code>

<code><i><font color="black"><span style='white-space: nowrap'>u</span></font></i></code>
  is currently a <a href="glossary.xml#Parameter" target="_top"><span style='white-space: nowrap'>parameter</span></a>

(not a variable).
<code><span style='white-space: nowrap'><br/>
<br/>
</span></code>Note that we often drop the word currently and 
just refer to an 
<code><font color="blue"><span style='white-space: nowrap'>AD&lt;</span></font><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i><font color="blue"><span style='white-space: nowrap'>&gt;</span></font></code>
 object as a variable
or parameter.


<hr/>Input File: omh/glossary.omh

</body>
</html>