Changeset 1325


Ignore:
Timestamp:
Jan 6, 2009 7:52:06 AM (12 years ago)
Author:
bradbell
Message:

trunk: Start whats new for 2009, imporvement ADFun documentation.

whats_new_09.omh: changes from user's point of view.
whats_new.omh: add link to section for 2009.
fun_construct.hpp: imporve specifications for x and y arguments.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/local/fun_construct.hpp

    r1214 r1325  
    3232
    3333$head Syntax$$
    34 $syntax%ADFun<%Base%> %f%
    35 %$$
    36 $syntax%ADFun<%Base%> %f%(%x%, %y%)
     34$codei%ADFun<%Base%> %f%
     35%$$
     36$codei%ADFun<%Base%> %f%(%x%, %y%)
    3737%$$
    3838
    3939
    4040$head Purpose$$
    41 The $syntax%AD<%Base%>%$$ object $italic f$$ can
    42 store an AD of $italic Base$$
     41The $codei%AD<%Base%>%$$ object $icode f$$ can
     42store an AD of $icode Base$$
    4343$xref/glossary/Operation/Sequence/operation sequence/1/$$.
    4444It can then be used to calculate derivatives of the corresponding
     
    4747        F : B^n \rightarrow B^m
    4848\] $$
    49 where $latex B$$ is the space corresponding to objects of type $italic Base$$.
     49where $latex B$$ is the space corresponding to objects of type $icode Base$$.
    5050
    5151$head x$$
    52 If the argument $italic x$$ is present,
    53 it must be the vector argument in the previous call to
     52If the argument $icode x$$ is present, it has prototype
     53$codei%
     54        const %VectorAD% &%x%
     55%$$
     56It must be the vector argument in the previous call to
    5457$cref/Independent/$$.
    5558Neither its size, or any of its values, are allowed to change
    5659between calling
    57 $syntax%
     60$codei%
    5861        Independent(%x%)
    5962%$$
    6063and
    61 $syntax%
     64$codei%
    6265        ADFun<%Base%> %f%(%x%, %y%)
    6366%$$.
    6467
    6568$head y$$
    66 The sequence of operations that map $italic x$$
    67 to $italic y$$ are stored in the AD function object $italic f$$.
    68 
     69If the argument $icode y$$ is present, it has prototype
     70$codei%
     71        const %VectorAD% &%y%
     72%$$
     73The sequence of operations that map $icode x$$
     74to $icode y$$ are stored in the AD function object $icode f$$.
     75
     76$head VectorAD$$
     77The type $icode VectorAD$$ must be a $cref/SimpleVector/$$ class with
     78$cref/elements of type/SimpleVector/Elements of Specified Type/$$
     79$codei%AD<%Base%>%$$.
     80The routine $cref/CheckSimpleVector/$$ will generate an error message
     81if this is not the case.
    6982
    7083$head Default Constructor$$
    7184The default constructor
    72 $syntax%
     85$codei%
    7386        ADFun<%Base%> %f%
    7487%$$
    7588creates an
    76 $syntax%AD<%Base%>%$$ object with no corresponding operation sequence; i.e.,
    77 $syntax%
     89$codei%AD<%Base%>%$$ object with no corresponding operation sequence; i.e.,
     90$codei%
    7891        %f%.size_var()
    7992%$$
     
    8295$head Sequence Constructor$$
    8396The sequence constructor
    84 $syntax%
     97$codei%
    8598        ADFun<%Base%> %f%(%x%, %y%)
    8699%$$
    87 creates the $syntax%AD<%Base%>%$$ object $italic f$$,
    88 stops the recording of AD of $italic Base$$ operations
     100creates the $codei%AD<%Base%>%$$ object $icode f$$,
     101stops the recording of AD of $icode Base$$ operations
    89102corresponding to the call
    90 $syntax%
     103$codei%
    91104        Independent(%x%)
    92105%$$
    93 and stores the corresponding operation sequence in the object $italic f$$.
     106and stores the corresponding operation sequence in the object $icode f$$.
    94107It then stores the first order taylor_ coefficients
    95 (corresponding to the value of $italic x$$) in $italic f$$.
     108(corresponding to the value of $icode x$$) in $icode f$$.
    96109This is equivalent to the following steps using the default constructor:
    97110$list number$$
    98 Create $italic f$$ with the default constructor
    99 $syntax%
     111Create $icode f$$ with the default constructor
     112$codei%
    100113        ADFun<%Base%> %f%;
    101114%$$
    102115$lnext
    103116Stop the tape and storing the operation sequence using
    104 $syntax%
     117$codei%
    105118        %f%.Dependent(%x%, %y%);
    106119%$$
     
    109122Calculating the first order taylor_ coefficients for all
    110123the variables in the operation sequence using
    111 $syntax%
     124$codei%
    112125        %f%.Forward(%p%, %x_p%)
    113126%$$
    114 with $italic p$$ equal to zero and the elements of $italic x_p$$
    115 equal to the corresponding elements of $italic x$$
     127with $icode p$$ equal to zero and the elements of $icode x_p$$
     128equal to the corresponding elements of $icode x$$
    116129(see $xref/Forward/$$).
    117130$lend
     
    125138the call to $code Independent$$
    126139and the corresponding call to
    127 $syntax%
     140$codei%
    128141        ADFun<%Base%> %f%( %x%, %y%)
    129142%$$
    130143or
    131 $syntax%
     144$codei%
    132145        %f%.Dependent( %x%, %y%)
    133146%$$
  • trunk/omh/whats_new.omh

    r1125 r1325  
    2424
    2525$childtable%
     26        omh/whats_new_09.omh%
    2627        omh/whats_new_08.omh%
    2728        omh/whats_new_07.omh%
Note: See TracChangeset for help on using the changeset viewer.