Prev Next whats_new_06

@(@\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}} }@)@
Changes and Additions to CppAD During 2006

This section contains a list of the changes to CppAD during 2006 (in reverse order by date). The purpose of this section is to assist you in learning about changes between various versions of CppAD.

Move exp_eps_ad to exp_eps_cppad and add exercises to the following sections: exp_eps_rev1 , exp_eps_cppad .

Add operation sequence indices to help track operations in exp_eps_for0 , exp_eps_for1 , exp_eps_rev1 .

Add exercises to the following sections: get_started.cpp , exp_eps , exp_eps_for0 , and exp_eps_for1 .

Move get_started.cpp below the introduction directory.

Move the exponential example to the subdirectory introduction/exp_apx and change the --with-Introduction unix configure option to build both the get_started.cpp and exp_apx.cpp example programs. (The --with-GetStarted configure command line option has been removed.)

Add the source code for Poly to the documentation and include Poly in the in the speed_utility section.

The get_started.cpp section has been moved into the Introduction and exercises were added to that section. In addition some sections has switched position between the top level CppAD and the Appendix .

Reorganize so that the source code is below the corresponding routine in the documentation tree (instead of at the same level) for the following routines: det_by_minor , det_grad_33 , uniform_01 , det_of_minor , det_by_lu , LuInvert , LuFactor , LuSolve .

Separate the specifications for the source in speed_utility and add cross reference to the following routine specification and implementations: det_by_minor , det_grad_33 , uniform_01 , det_of_minor , det_by_lu , LuInvert , LuFactor , LuSolve .

Make the speed source code easier to read.

Change the speed test output name det_poly to poly (as it should have been).

The speed test det_grad_33 was missing its documentation (this has been fixed). In addition, the titles and indexing for the speed test documentation has been improved.

Add to the specifications that each repeated test corresponds to a different matrix in det_lu and det_minor . In addition, modify all the speed tests so that they abide by this rule.

Change some references from the deprecated name CppAD.h to new name cppad.hpp.

Change adolc_det_minor.cpp and cppad_det_minor.cpp to tape once and reuse operation sequence for each repeated matrix in the test.

Add the poly speed test for all three packages. In addition, correct a missing include in poly routine.

The wish list item to simplify and better organize the speed tests been completed:
speed/ template functions that are speed tested
speed/example example usage of speed template functions
speed/adolc Adolc drivers for the template functions
speed/cppad CppAD drivers for the template functions
speed/fadbad Fadbad drivers for the template functions
speed/profile profiling version of CppAD drivers

Next step for the speed wish list item: remove speed_cppad from the documentation and replace it by speed/cppad, see speed_cppad for the new CppAD speed test routines.

Started the speed wish list item by move the adolc director to speed/adolc and fadbad to speed/fadbad.

Started the speed wish list item by creating the speed/example directory and moving the relevant examples from example/*.cpp and speed_example/*.cpp to speed/example/*.cpp . In addition, the relevant include files have been moved from example/*.hpp to speed/*.hpp .

A new speed_test routine was added to the library.

The pow function was changed to be a an AD<Base> atomic operation. This function used to return a nan if x is negative because it was implemented as
xy) = exp( log(x) * y )
This has been fixed so that the function and its derivatives are now calculated properly when x is less than zero. The pow documentation was improved and the pow.cpp example was changed to test more cases and to use the same variable names as in the documentation.

A speed wish list item was added to the wish list.

The prototype for int arguments in binary operations (for example addition ) was documented as const int & but was actually just plain int. This has been fixed. (Later changed to double.)

Fix bug in the subversion installation instructions; see bug report .

The some of the automatically generated files had an improper license statement in the GPL license version. This has been fixed.

Add the unix installation --with-Documentation option and remove the postfix_dir option.

Create a fixed whats_new section above the section for each particular year. Also improve the CppAD distribution README file.

The include file directory CppAD was changed to be all lower case; i.e., cppad. If you are using a Unix system, see include_deprecated . This completes the following wish_list items (which were removed):
  1. File and directory names should only contain lowercase letters, numbers underscores and possibly one period. The leading character must be alphabetic.
  2. C++ header files should have the .hpp extension.

Put explanation of version numbering in the download instructions.

Correct some file name references under the Windows heading in speed_cppad .

All of the and Makefile files were changed to lower case; i.e., and makefile.

Fix compiler warning while compiling cppad/RombergOne/ (mistake occurred during 11-20 change).

Cygwin packages, and other system packages, should not have a dash in the version number. See cygwin package file naming or, to quote the rpm file naming convention The only restriction placed on the version is that it cannot contain a dash "-". As per the acceptable package naming conventions for cygwin, CppAD version numbering has be changed from yy-mm-dd format to yyyymmdd ; i.e. cppad-06-11-30 was changed to cppad-20061130.

There was a problem using RombergOne with floating point types other than double. This has been fixed.

The installation download files were not being built because referenced Doc when it should have referenced doc. This has been fixed.

A Version Numbering entry was added to the wish_list (this was completed on 11-30 ).

The example routine that computes determinants using expansion by minors DetOfMinor was changed to det_of_minor , in preparation for more formal speed comparisons with other packages. To be specific, its documentation was improved, its dependence on the rest of CppAD was removed (it no longer includes CppAD.h ).

The general.cpp and test_more/test_more.cpp programs were changed to print out the number of tests that passed or failed instead of just "All the tests passed" or "At least one of the tests failed".

The windows project files for examples and testing should have been changes to use lower case file names on as part of the 11-08 change below. This has been fixed.

Move the Example directory to example and change all its files to use lower case names.

Move the TestMore directory to test_more and change all its files to use lower case names.

Remove references in the speed_cppad tests to the Memory and Size functions because they have been deprecated .

Correct some references to var_size that should have been size_var .

Put text written to standard output in the documentation for the get_started.cpp and print_for.cpp examples. (Now documentation can be built from a subversion checkout with out needing to execute automake.) The PrintFor.cpp and speedtest.cpp examples were missing in ListAllExamples (which has been fixed).

Move the Speed directory to speed and change all its files to use lower case names.

The print_for directory was referenced as PrintFor in the root CppAD this has been fixed.

The documentation for the Adolc helper routines AllocVec and AllocMat were not being included. This has been fixed.

Move the GetStarted directory to get_started and change all its files to use lower case names.

Move the PrintFor directory to print_for and change all its files to use lower case names.

Move the SpeedExample directory to speed_cppad_example and change all its files to use lower case names.

Move the Adolc directory to adolc and change all its files to use lower case names.

Change all the file in the omh directory to use lower case names.

The file in the distribution directory had the CPL copyright message in the GPL version. This has been fixed.

The copyright message in the script files example/OneTest and TestMore/OneTest were GPL (in the CPL distribution). This has been fixed by moving them to example/ and TestMore/ so that the distribution automatically edits the copyright message.

Change hes_lagrangian.cpp example so that it computes the Lagrangian two ways. One is simpler and the other can be used to avoid re-taping operation sequence.

Change hes_lagrangian.cpp example so that it modifies the independent variable vector between the call to Independent and the ADFun<Base> constructor .

A subversion install procedure was added to the documentation.

Fix definition of preprocessor symbol PACKAGE_STRING in Speed/Speed.cpp (broken by change on 10-18).

Added the example hes_lagrangian.cpp which computes the Hessian of a Lagrangian.

Document and fix possible conflicts for preprocessor symbols that do not begin with CppAD or CPPAD_.

Include a default value for the file cppad/config.h in the subversion repository.

Fix bug when using OdeErrControl with the type AD< AD<double> >.

Add the Var2Par function so it is possible to obtain the Value of a variable. Move the Discrete.cpp example to tape_index.cpp . Fix the Microsoft project file so that the Windows install examples and testing works properly (it was missing the stack_machine.cpp example).

These changes were grouped together because it took a while for Coin-Or to review the dual licensing version and because it was not possible to get the nightly build changed:
  1. Change shell scripts to use *.sh extension.
  2. Two versions, one with CPL and other with GPL license.
  3. Change subversion version of CppAD from GPL to CPL copyright.
  4. Change all files in cppad/local to use lower case and *.hpp extension.
  5. CppAD_vector.h was generating a warning on version 4 of gcc. This have been fixed.
  6. Change the preprocessor # define commands in cppad/local/*.hpp to use upper case names.
  7. Add the stack_machine.cpp example.

Some error message occurred while executing
     valgrind --tool=memcheck example/example
     valgrind --tool=memcheck TestMore/TestMore

These were not really bugs, but they have been fixed to avoid this conflict between CppAD and valgrind .

Make some improvements were made to the Introduction , exp_eps.hpp and exp_eps_rev1 sections.

Use a drop down menu for the navigation links, instead of a separate frame for the navigation links, for each section in the documentation.

Newer versions of the gcc compiler generated an error because erf was using CondExp before it was defined. This was found by Kasper Kristensen and his fix has been included in the CppAD distribution.

The ADFun operation f(xy) no longer executes a zero order Forward operation when a new operation sequence is stored in f . In addition, the syntax for this operation was changed to f.Dependent(y) (see Dependent ).

The changes listed under 06-17 and 06-18 were made in the branches/ADFun branch of the CppAD subversion repository. They did not get merged into the trunk and become part of the distribution until 06-19. This accomplished the following goal, which was removed from the wish_list :

"We would like to be able to erase the function values so that ADFun objects use less memory. We may even want to erase the AD operation sequence so that ADFun objects use even less memory and can be used for a subsequent AD operation sequence."

Added capacity_order which can be used to control the amount of memory used to store Forward results. Also deprecated taylor_size, and defined size_order in its place.

Added the ADFun default constructor and the ability to store a new operation sequence in an ADFun object with out having to use ADFun pointers together with new and delete.

The location where the distribution files are stored has changed and this broke the Download Current Version links for the unix and windows installation. This has been fixed.

The compiling instructions for the speed_cppad routines have been improved.

The Value function has been extended to allow for parameter arguments even if the corresponding tape is in the Recording state.

The BenderQuad documentation and example have been improved by changing Vector to BAvector to emphasize that it corresponds to a vector of Base objects.

Change BenderQuad to use Base instead of AD<Base> where every possible. This allows for more calculations to be done in the base type; i.e., is more efficient.

Add a size check (size one) for the function value argument, g in BenderQuad.

Some major changes were made to the notation in get_started.cpp (to make it easier to start using CppAD).

In the Introduction example, @(@ exp_eps @)@ was changed to @(@ {\rm exp\_eps} @)@.

Change BenderQuad @(@ F_y (x, y) @)@ to @(@ H(x,y) @)@ so applies in a more general setting. This was another change to the BenderQuad interface, fun.fy was changed to fun.h .

Newer versions of the gcc compiler generated a warning for possible use of an uninitialized pointer. This was found by Michael Tautschnig and his fix has been included in the CppAD distribution.

The interface to BenderQuad has been changed. Now all the function evaluation routines are member functions of one class object. This makes it easy for them to share common data.

Change statement of command syntax to be in the same browser frame as the command documentation (for all the commands with a syntax statement). Now when a user links to a specific heading in a command's documentation, the syntax for that command is automatically included. Before the user needed to follow another link to see to the command syntax.

Added BenderQuad for computing the Hessian of Bender's reduced objective function.

Added special specifications for resize(0) to CppAD_vector .

The g++ (GCC) 4.1.0 (Red Hat 4.1.0-3) compiler reported an error because certain functions were used before being defined (version 3.4.4 did not complain about this). This has been fixed.

Change all of the example and test driver programs so that they return error codes; i.e., zero for no error and one for an error.

Add more discussion and a reference for a gcc 3.4.4 -O2 bug (since been removed).

Improve the get_started.cpp example and move it so that it is visible at the too level of the documentation.

The programs in Introduction have been converted to automated test that return true or false with the driver program Introduction .

Add an Introduction section to the documentation (replaces old example that was part of the Theory section).

A discussion was added near the end of the FunCheck documentation. And the cross references to the CompareChange discussion were changed to the FunCheck discussion.

An operation sequence entry was added to the wish_list .

The new definitions for AD of Base and operation sequence have been used throughout the documentation.

Add the FunCheck section for checking that a sequence of operations is as intended.

The documentation for SpeedTest and Poly was improved.

Definitions were added for an atomic operation and for an operation sequence being dependent and independent of the values of specific operands.

The definition of AD sequence of operations was made abstract and moved to the glossary as Type operation sequence .

The mul_level example was moved from ADFun to General . The documentation for SpeedTest was improved.

Documentation and examples were improved for the following routines: ForTwo , RevTwo . In addition, the computation in RevTwo was made more efficient (it used to possibly calculate some first order partials that were not used).

Documentation and examples were improved for the following routines: Jacobian , ForOne , RevOne , and Hessian .

In the case where use_VecAD is true, the ForSparseJac calculation in only for the current independent variable values. In this case, the sparsity pattern can be (and has been) made more efficient; i.e., fewer true values (because it only applies to the current forward_zero ).

The conversion from VecAD<Base>::reference to AD gave a compile error (this has been fixed). Code example for this fix
     VecAD<double> V(1);
     AD<double> zero = 0;
     V[zero] = 1.;
     static_cast< AD<double> > ( V[zero] );

The ForSparseJac , RevSparseJac , RevSparseHes sparsity results are now valid for all independent variable values (if the AD operation sequence does no use any VecAD<Base> operands). In addition, the ForSparseJac, RevSparseJac and RevSparseHes documentation and examples were improved.

The useVecAD member function was added to ADFun objects.

The var_size member function was changed to size_var (this is not backward compatible, but var_size was just added on 04-03 ).

The documentation and example for CompareChange were improved and moved to be part of the Forward section.

The documentation and examples for Reverse were improved and split into reverse_one and reverse_any .

Create separate sections for the zero and forward_one first order case of Forward mode.

The ADFun Size member function has been deprecated (use size_order instead).

The Reverse member function is now declared, and documented as, const; i.e., it does not effect the state of the ADFun object.

Change the examples that use Reverse to use the same return value notation as the documentation; i.e., dw.

The member functions of ADFun that return properties of AD of Base operation sequence have been grouped into the seq_property section. In addition, the seq_property.cpp example has been added.

The CompareChange function documentation was improved and moved to a separate section.

Group the documentation for the ADFun member functions that evaluate functions and derivative values. This organization has since been changed.

Remove the old Fun.cpp example and extend independent.cpp so that it demonstrates using different choices for the SimpleVector type.

Move the ADFun Constructor to its own separate section, improve its documentation, and use independent.cpp for its example.

The following member functions of ADFun have been deprecated : Order, Memory.

The wish list entry for Memory usage was updated on 04-01. The request was implemented on 06-19 and the entry was removed from the wish list.

Add examples for the Parameter, Variable and Independent functions.

Move the Parameter and Variable functions from the ADFun section to the AD section.

In the examples for the AD sections, refer to the range space vector instead of the dependent variable vector because some of the components may not be variables .

Move the LuRatio section below LuDetAndSolve .

Move the definition of an AD of Base operation sequence from the glossary to the AD section.

Improve the definition of tape state.

Add mention of taping to Erf , BoolFun , NearEqualExt ,and Pow .

Change the definition for VecAD<Base>::reference so that it stands out of the text better.

Mention the VecAD<Base>::reference case in documentation and examples for abs , atan2 , erf , and pow .

Fix a bug derivative computation for abs(x) when x had type AD< AD<double> > and x had value zero.

Fix a bug using non-zero AD indices for VecAD vectors while the tape is in the empty state.

Extend erf to include float, double, and VecAD<Base>::reference .

Mention the VecAD<Base>::reference case in documentation and examples for UnaryPlus , UnaryMinus , ad_binary , compound_assign , and unary_standard_math

Extend and improve the VecAD exceptions .

Mention the VecAD<Base>::reference case and generally improve addition documentation and examples.

Improve documentation and examples for VecAD and change its element type from VecADelem<Base> to VecAD_reference<Base> (so that it looks more like VecAD<Base>::reference ).

Mention the VecAD<Base>::reference case and generally improve Value , ad_output and assignment documentation and examples.

Extend Integer and PrintFor to include the VecAD<Base>::reference case (and mention in documentation and examples).

Move VecAD and LuRatio from the old ExtendDomain section to AD .

Improve documentation and examples for CondExp and Discrete . Move both of these sections from ExtendDomain to ADValued .

The documentation sections under AD have been organized into a new set of sub-groups.

The documentation and example for PrintFor have been improved. The sections below AD in the documentation have been organized into subgroups.

The documentation and examples have been improved for the following functions: BoolFun , and NearEqualExt .

Improve the documentation and example for the pow function. This includes splitting out and generalizing the integer case pow_int .

The copies of the atan2 function were included in the CppAD namespace for the float and double types.

Improve the introduction to CppAD.

The file cppad/local/MathOther.h had a file name case error that prevented the documentation from building and tests from running (except under Cygwin which is not really case sensitive). This has been fixed.

The term AD of Base operation sequence has been defined. It will be used to improve the user's understanding of exactly how an ADFun object is related to the C++ algorithm.

The math functions that are not under unary_standard_math have been grouped under MathOther.

The documentation and examples have been improved for the following functions: abs , atan2 .

The examples cos.cpp , cosh.cpp , exp.cpp , log.cpp , log10.cpp , sin.cpp , sinh.cpp , sqrt.cpp have been improved.

The tan function has been added to CppAD.

The examples Acos.cpp , Asin.cpp and atan.cpp have been improved.

The AD standard math unary functions documentation has been grouped together with improved documentation in unary_standard_math .

The ad_output and Abs documentation and example have been improved. Minor improvements were also made to the lu_vec_ad.cpp documentation.

The Compare documentation and example have been improved.

The documentation and examples have been improved for the following sections: division , -= , *= , and /= .

The multiplication documentation and example have been improved.

The subtraction documentation and example have been improved.

There was a bug RevTwo that was not detected by the rev_two.cpp test. This bug was reported by Kasper Kristensen A test was added TestMore/rev_two.cpp that detects this problem and the problem has been fixed.

The += documentation and example have been improved.

The addition documentation and example have been improved.

Combine the old binary operator and compound assignment documentation into Arithmetic documentation.

The documentation and examples have been improved for the following sections: assignment , UnaryPlus , UnaryMinus .

The documentation and examples have been improved for the following sections: ad_ctor , ad_ctor and ad_assign , and Value .

This is the beginning of a pass to improve the documentation: The documentation sections The CopyBase (formerly FromBase and now part of ad_ctor and ad_assign ) and AD copy constructor (formerly Copy) documentation has been modified.

Some of the error messaging during ADFun construction has been improved.

There was a read memory access past the end of an array in CppAD::vector::push_back . This has been fixed and in addition TrackNewDel is now used to do and check the allocation in CppAD::vector.

The routines Runge45 and Rosen34 had static vectors to avoid recalculation on each call. These have been changed to be plain vectors to avoid memory leak detection by TrackCount .

Add software guidelines to the wish list.

Improve the definition for parameters and variables . Remove unnecessary reference to parameter and variable in documentation for Independent .

The aclocal program is part of the automake and autoconf system. It often generates warnings of the form:
...: warning: underquoted definition of
The shell script file FixAclocal, which attempts to fix these warnings, was added to the distribution.

Change CppAD error handler from using the macros defined in cppad/CppADError.h to using a class defined in cppad/utility/error_handler.hpp . The macros CppADUnknownError and CppADUsageError have been deprecated (they are temporarily still available in the file cppad/local/CppADError.h).

Add the sed script Speed/gprof.sed to aid in the display of the profiling output.

Make the following source code files easier to understand: Add.h, Sub.h, Mul.h, Div.h (in the directory cppad/local).

Make the following source code files easier to understand: RevSparseHes.h, Reverse.h, Fun.h, Forward.h, ForSparseJac.h, RevSparseJac.h (in the directory cppad/local).
Input File: omh/appendix/whats_new/whats_new_06.omh