Changeset 3757


Ignore:
Timestamp:
Nov 30, 2015 7:03:07 AM (5 years ago)
Author:
bradbell
Message:

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

commit aec9ede58726ce1a40825eac63d4d8f7cb40bfba
Author: Brad Bell <bradbell@…>
Date: Sun Nov 29 21:24:17 2015 -0800

Move omh/libaray to omh/utility becasue it corresponds to cppad/utility.

commit 17b6e02f29dcc2a1ab2d2e6980a979374e73e19e
Author: Brad Bell <bradbell@…>
Date: Sun Nov 29 19:03:22 2015 -0800

Batch edit the entire souce directory using the script

bin/batch_edit.sh

  1. With a few exceptions, move cppad/*.hpp to cppad/utility/*.hpp
  2. Change include gaurd from CPPAD_<NAME>_INCLUDED to CPPAD_<NAME>_HPP
  3. Make the source code control $Id$ commands more uniform.
  4. Remove invisible white space
  5. Create utility.hpp (includes entire utilty directory)

commit 4a8fbe249f97116cac86583a7d9bf596dbb06473
Author: Brad Bell <bradbell@…>
Date: Sun Nov 29 18:12:50 2015 -0800

new version that passes bin/check_all.sh

commit f041069fe3e24d68133f829353f7200cf2c299ed
Author: Brad Bell <bradbell@…>
Date: Sun Nov 29 14:27:08 2015 -0800

pases bin/check_all.sh

commit 32ac61696305b7625938d4c488203cdcc19f36dc
Author: Brad Bell <bradbell@…>
Date: Sun Nov 29 06:13:56 2015 -0800

passed bin/check_all.sh

Location:
trunk
Files:
3 added
20 deleted
533 edited
27 moved

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r3754 r3757  
    280280ADD_SUBDIRECTORY(pkgconfig)
    281281ADD_SUBDIRECTORY(cppad_lib)
     282ADD_SUBDIRECTORY(cppad/utility)
    282283#
    283284ADD_SUBDIRECTORY(compare_c)
     
    327328# ${cppad_abs_includedir}/cppad
    328329INSTALL(
    329         DIRECTORY "cppad/"
     330        DIRECTORY "${CMAKE_BINARY_DIR}/cppad/utility/"
    330331        DESTINATION ${cppad_abs_includedir}/cppad
    331         FILES_MATCHING PATTERN "*.h"
    332332)
    333333INSTALL(
    334         DIRECTORY "cppad/"
     334        DIRECTORY "${CMAKE_SOURCE_DIR}/cppad/"
    335335        DESTINATION ${cppad_abs_includedir}/cppad
    336336        FILES_MATCHING PATTERN "*.hpp"
  • trunk/bin/add_copyright.sh

    r3565 r3757  
    5353        ;;
    5454
    55         cmake)
     55        cmake | txt)
    5656        cat << EOF  > bin/add_copyright.$$
    57 # \$Id:\$
     57# \$Id\$
    5858# -----------------------------------------------------------------------------
    5959# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     
    7272        cat << EOF  > bin/add_copyright.$$
    7373#! /bin/bash -e
    74 # \$Id:\$
     74# \$Id\$
    7575# -----------------------------------------------------------------------------
    7676# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/bin/batch_edit.sh

    r3756 r3757  
    11#! /bin/bash -e
    2 # $Id:$
     2# $Id$
    33# -----------------------------------------------------------------------------
    44# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     
    1616        exit 1
    1717fi
     18# -----------------------------------------------------------------------------
     19# 1. With a few exceptions, move cppad/*.hpp to cppad/utility/*.hpp
     20# 2. Remove index commands that became redundant when the words in
     21#    section, head, and subhead commands were automatically indexed.
     22# 3. Change include gaurd from CPPAD_<NAME>_INCLUDED to CPPAD_<NAME>_HPP
     23# 4. Make the source code control $Id$ commands more uniform.
     24# 5. Remove invisible white space
     25# 6. Create utility.hpp (includes entire utilty directory)
     26# 7. cppad/utility/CMakeLists.txt create deprecated include file links
     27# -----------------------------------------------------------------------------
     28# bash function that echos and executes a command
     29echo_eval() {
     30        echo $*
     31        eval $*
     32}
     33# -----------------------------------------------------------------------------
    1834#
    1935git reset --hard
    20 cp bin/new/reduce_index.py bin/reduce_index.py
    21 cp bin/new/doxyfile.sh bin/doxyfile.sh
    22 cp bin/new/batch_edit.sh bin/batch_edit.sh
    23 #
    24 if [ ! -e cppad/utility ]
    25 then
    26         mkdir cppad/utility
    27 fi
    28 if [ -e junk.sed ]
    29 then
    30         rm junk.sed
    31 fi
    32 list=`ls cppad/*.h | sed -e 's|cppad/||'`
    33 for file in $list
    34 do
    35         echo_eval git mv cppad/$file cppad/utility/$file
    36 cat << EOF >> junk.sed
    37 s|^\\tcppad/$file |\\tcppad/utility/$file |
    38 EOF
    39 done
     36# ---------------------------------------------------------------------------
     37# cleanup from a previous run
     38#
     39list='
     40cppad/utility
     41cppad/utility.hpp
     42junk.sed
     43'
     44for name in $list
     45do
     46        if [ -e "$name" ]
     47        then
     48                echo_eval "rm -r $name"
     49        fi
     50done
     51echo_eval mkdir cppad/utility
     52# ---------------------------------------------------------------------------
     53# files that are hand edited
     54list='
     55add_copyright.sh
     56reduce_index.py
     57doxyfile.sh
     58batch_edit.sh
     59'
     60for file in $list
     61do
     62        echo_eval cp bin/new/$file bin/$file
     63done
     64chmod +x bin/batch_edit.sh
     65# ---------------------------------------------------------------------------
     66# cppad/*.hpp files, move to utility drectory
     67# except for cppad.hpp, configure.hpp, configure.hpp.in
     68#
    4069list=`ls cppad/*.hpp | sed  \
    4170        -e 's|cppad/||' \
     
    5584EOF
    5685done
     86# ---------------------------------------------------------------------------
     87# junk.sed
    5788cat << EOF >> junk.sed
     89# fix double word errors inside of mindex commands
     90# that are created by reduce_index.py below
    5891s|mindex SparseJacobian jacobian|mindex SparseJacobian|
    5992s|index OdeErrControl control|index OdeErrControl|
     
    6396s|mindex log log1p|mindex log1p|
    6497#
     98# change include gaurd to more standard fom
     99# (works better when you have name.h and name.hpp)
    65100s|# *ifndef *CPPAD_\\([A-Z0-9_]*\\)_INCLUDED|# ifndef CPPAD_\\1_HPP|
    66101s|# *define *CPPAD_\\([A-Z0-9_]*\\)_INCLUDED|# define CPPAD_\\1_HPP|
    67102#
    68 /^# \\$Id\\$\\\$/d
    69 /^# \\$Id:\\$\\\$/d
    70 /^\\/\\/ \\$Id\\$\\\$/d
    71 /^\\/\\* \\$Id\\$ \\*\\/\\\$/d
     103# change source code control Id commands to be more iniform
     104s|^# \$Id[^\$]*\$\$|# \$Id\$|
     105s|^// \$Id[^\$]*\$\$|// \$Id\$|
     106s|^/\\* *\$Id[^\$]*\$ *\\*/\$|// \$Id\$|
    72107EOF
     108# ----------------------------------------------------------------------------
    73109list=`git ls-files | sed -n \
    74110        -e '/\.omh$/p'  \
     
    77113        -e '/\.cpp$/p'  \
    78114        -e '/makefile.am$/p'  \
    79         -e '/\.h$/p'  \
    80         -e '/\.c$/p'  \
    81115`
    82116for file in $list
    83117do
     118        # remove redundant index entries
    84119        bin/reduce_index.py $file
     120        # see comments in junk.sed above
    85121        sed -f junk.sed -i $file
     122        # remove invisible white space
    86123        sed -e 's|[ \t][ \t]*$||' -e 's| *\t|\t|g' -i $file
    87124done
    88 #
     125# ----------------------------------------------------------------------------
     126# move changes corresponding to new include gaurd
    89127sed -e 's|_INCLUDED|_HPP|' -i bin/check_define.sh
    90128sed -e 's|_INCLUDED|_HPP|' -i bin/check_include_def.sh
     129# ----------------------------------------------------------------------------
     130# create utility.hpp and
     131# change examples to use utility.hpp instead if individual include files
     132list=`ls cppad/utility/*.hpp`
     133for file in $list
     134do
     135        echo "# include <$file>" >> cppad/utility.hpp
     136        root=`echo $file | sed -e 's|.*/||'`
     137        sed \
     138        -e "s|$codei%# *include *<cppad/$root>|%# include <cppad/utility.hpp>|" \
     139        -e "s|$code *# *include *<cppad/$root>|%# include <cppad/utility.hpp>|" \
     140        -i $file
     141done
     142bin/add_copyright.sh cppad/utility.hpp
     143sed \
     144        -e '1s/$/\n# ifndef CPPAD_UTILITY_HPP\n# define CPPAD_UTILITY_HPP/' \
     145        -e '$s/$/\n# endif/' \
     146        -i cppad/utility.hpp
     147git add cppad/utility.hpp
     148#
     149sed -e 's|\tcppad/base_require.hpp|\tcppad/utility.hpp\n&|' -i makefile.am
     150# ----------------------------------------------------------------------------
     151# use utility.hpp in cppad.hpp
     152sed \
     153        -e '25,48d' \
     154        -e '24s|$|\n# include <cppad/utility.hpp>|' \
     155        -i cppad/cppad.hpp
     156# ----------------------------------------------------------------------------
     157# change examples and documentation to use utility.hpp
     158list=`git ls-files | sed -n \
     159        -e '/\.omh$/p'  \
     160        -e '/^example\//p' \
     161        -e '/^cppad_ipopt\/example\//p' \
     162`
     163for file in $list
     164do
     165        sed \
     166        -e 's|^# *include *<cppad/utility/[a-z_]*\.hpp>]*>|# include <cppad/utility.hpp>|' \
     167        -i $file
     168done
     169# ----------------------------------------------------------------------------
     170# create cppad/utility/CMakeLists.txt and delete cppad/*.h
     171#
     172cmake_file='cppad/utility/CMakeLists.txt'
     173touch $cmake_file
     174bin/add_copyright.sh $cmake_file
     175echo "FOREACH(old_include_file" >> $cmake_file
     176#
     177list=`git ls-files cppad/utility/*.hpp`
     178for file in $list
     179do
     180        name=`echo $file | sed -e 's|cppad/utility/||'`
     181        echo "  $name"  >> $cmake_file
     182done
     183#
     184list=`git ls-files cppad/*.h`
     185for file in $list
     186do
     187        name=`echo $file | sed -e 's|cppad/||'`
     188        echo "  $name"  >> $cmake_file
     189        git rm $file
     190done
     191cat << EOF >> $cmake_file
     192)
     193        FILE(WRITE
     194                \${CMAKE_BINARY_DIR}/cppad/utility/\${old_include_file}
     195                "# include <cppad/utility.hpp>\\n"
     196        )
     197ENDFOREACH(old_include_file)
     198EOF
     199git add $cmake_file
     200#
     201git checkout CMakeLists.txt
     202sed \
     203        -e 's|ADD_SUBDIRECTORY(cppad_lib)|&\nADD_SUBDIRECTORY(cppad/utility)|' \
     204        -e '329s|cppad/|${CMAKE_BINARY_DIR}/cppad/utility/|' \
     205        -e '331,331d' \
     206        -e '334s|cppad/|${CMAKE_SOURCE_DIR}/cppad/|' \
     207        -i CMakeLists.txt
     208sed -e '/\tcppad\/.*\.h \\/d' -i makefile.am
     209# ----------------------------------------------------------------------------
  • trunk/bin/check_define.sh

    r3689 r3757  
    3535        if [ "$cmd" == 'define' ]
    3636        then
    37                 sed -e '/_INCLUDED$/d' -i tmp.$$
     37                sed -e '/_HPP$/d' -i tmp.$$
    3838        fi
    3939        sort -u tmp.$$ > $cmd.$$
  • trunk/bin/check_include_def.sh

    r3689 r3757  
    2222list=`bin/list_files.sh | sed -n -e '/\.hpp$/p'`
    2323#
    24 grep '^# *ifndef *CPPAD_[0-9a-zA-Z_]*_INCLUDED$' $list \
    25         | sed -e 's|.*# *ifndef *CPPAD_\([0-9a-zA-Z_]*\)_INCLUDED$|\1.HPP|' \
     24grep '^# *ifndef *CPPAD_[0-9a-zA-Z_]*_HPP$' $list \
     25        | sed -e 's|.*# *ifndef *CPPAD_\([0-9a-zA-Z_]*\)_HPP$|\1.HPP|' \
    2626        | tr [a-zA-Z] [A-Za-z] \
    2727        | sort \
  • trunk/bin/doxyfile.sh

    r3755 r3757  
    5050        ./cppad/local \
    5151        ./cppad/ipopt \
     52        ./cppad_ipopt/src \
    5253        ./cppad_lib \
    53         ./cppad_ipopt/src \
     54        ./cppad/utility \
    5455        ./speed/src
    5556LATEX_BATCHMODE         = YES
  • trunk/bin/reduce_index.py

    r3741 r3757  
    4646begin_pattern   = re.compile('[$]begin ([^$]*)[$][$]')
    4747end_pattern     = re.compile('[$]end')
    48 section_pattern = re.compile('[$](section) ([^$]*)[$][$]')
     48section_pattern = re.compile('[$](section)\s([^$]*)[$][$]')
    4949index_pattern   = re.compile('[$][mc]{0,1}(index) ([^$]*)[$][$]')
    5050cmd_pattern     = re.compile('[$]([a-z]*) ([^$]*)[$][$]')
     
    117117                                                index_list.append(word)
    118118                                                exclude_list.append(word_lower)
     119                # keep words that are not in start of other words
     120                keep_index = list()
     121                for word_1 in index_list :
     122                        ok_1 = True
     123                        for word_2 in index_list :
     124                                if word_2.startswith(word_1 + '_') :
     125                                        ok_1 = False
     126                                if word_2.endswith('_' + word_1) :
     127                                        ok_1 = False
     128                        if ok_1 :
     129                                keep_index.append(word_1)
    119130                #
    120131                # write out data to the end of section command
     
    122133                data = remove_index_cmd( section_data[ : section_cmd.end() ] )
    123134                f_out.write( data )
    124                 if len(index_list) > 0 :
     135                if len(keep_index) > 0 :
    125136                        index_cmd = '$mindex'
    126                         for word in index_list :
     137                        for word in keep_index :
    127138                                index_cmd += ' ' + word
    128139                        index_cmd += '$$'
  • trunk/cppad/base_require.hpp

    r3738 r3757  
    11// $Id$
    2 # ifndef CPPAD_BASE_REQUIRE_INCLUDED
    3 # define CPPAD_BASE_REQUIRE_INCLUDED
     2# ifndef CPPAD_BASE_REQUIRE_HPP
     3# define CPPAD_BASE_REQUIRE_HPP
    44
    55/* --------------------------------------------------------------------------
     
    157157
    158158// definitions that must come before base implementations
    159 # include <cppad/error_handler.hpp>
     159# include <cppad/utility/error_handler.hpp>
    160160# include <cppad/local/define.hpp>
    161161# include <cppad/local/cppad_assert.hpp>
  • trunk/cppad/configure.hpp.in

    r3755 r3757  
    11// $Id$
    2 # ifndef CPPAD_CONFIGURE_INCLUDED
    3 # define CPPAD_CONFIGURE_INCLUDED
     2# ifndef CPPAD_CONFIGURE_HPP
     3# define CPPAD_CONFIGURE_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/cppad.hpp

    r3232 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CPPAD_INCLUDED
    3 # define CPPAD_CPPAD_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CPPAD_HPP
     3# define CPPAD_CPPAD_HPP
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
     
    2323// ---------------------------------------------------------------------------
    2424// CppAD general purpose library routines (can be included separately)
    25 
    26 # include <cppad/check_numeric_type.hpp>
    27 # include <cppad/check_simple_vector.hpp>
    28 # include <cppad/index_sort.hpp>
    29 # include <cppad/local/cppad_assert.hpp>
    30 # include <cppad/lu_solve.hpp>
    31 # include <cppad/memory_leak.hpp>
    32 # include <cppad/near_equal.hpp>
    33 # include <cppad/ode_err_control.hpp>
    34 # include <cppad/ode_gear.hpp>
    35 # include <cppad/ode_gear_control.hpp>
    36 # include <cppad/omp_alloc.hpp>
    37 # include <cppad/poly.hpp>
    38 # include <cppad/pow_int.hpp>
    39 # include <cppad/romberg_mul.hpp>
    40 # include <cppad/romberg_one.hpp>
    41 # include <cppad/rosen_34.hpp>
    42 # include <cppad/runge_45.hpp>
    43 # include <cppad/speed_test.hpp>
    44 # include <cppad/time_test.hpp>
    45 # include <cppad/track_new_del.hpp>
    46 # include <cppad/thread_alloc.hpp>
    47 # include <cppad/vector.hpp>
    48 
     25# include <cppad/utility.hpp>
    4926// --------------------------------------------------------------------------
    50 // System routines that can be used by rest of CppAD with out including 
     27// System routines that can be used by rest of CppAD with out including
    5128
    5229# include <cstddef>
     
    9370
    9471// undo definitions in Define.h
    95 # include <cppad/local/undef.hpp>   
     72# include <cppad/local/undef.hpp>
    9673
    9774# endif
  • trunk/cppad/example/base_adolc.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_ADOLC_INCLUDED
    3 # define CPPAD_BASE_ADOLC_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_ADOLC_HPP
     3# define CPPAD_BASE_ADOLC_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/example/cppad_eigen.hpp

    r3065 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CPPAD_EIGEN_INCLUDED
    3 # define CPPAD_CPPAD_EIGEN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CPPAD_EIGEN_HPP
     3# define CPPAD_CPPAD_EIGEN_HPP
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
    8 the terms of the 
     8the terms of the
    99                    Eclipse Public License Version 1.0.
    1010
     
    5252
    5353$head Purpose$$
    54 Enables the use of the 
     54Enables the use of the
    5555$href%http://eigen.tuxfamily.org%eigen%$$
    5656linear algebra package with the type $icode%AD<%Base%>%$$.
    5757
    5858$head Example$$
    59 The files $cref eigen_array.cpp$$ and $cref eigen_det.cpp$$ 
     59The files $cref eigen_array.cpp$$ and $cref eigen_det.cpp$$
    6060contain an example and test of this include file.
    6161It returns true if it succeeds and false otherwise.
     
    6363$head Include Files$$
    6464The file $code cppad_eigen.hpp$$ includes both
    65 $code <cppad/cppad.hpp>$$ and $code <Eigen/Core>$$. 
     65$code <cppad/cppad.hpp>$$ and $code <Eigen/Core>$$.
    6666In addition,
    67 The file $cref eigen_plugin.hpp$$ 
     67The file $cref eigen_plugin.hpp$$
    6868is used to define $code value_type$$
    69 in the Eigen matrix class definition so its vectors are 
     69in the Eigen matrix class definition so its vectors are
    7070$cref/simple vectors/SimpleVector/$$.
    7171$codep */
     
    110110                // operations that should result in the same value
    111111                static CppAD::AD<Base> dummy_precision(void)
    112                 {       return 100. * 
    113                                 CppAD::numeric_limits< CppAD::AD<Base> >::epsilon(); 
     112                {       return 100. *
     113                                CppAD::numeric_limits< CppAD::AD<Base> >::epsilon();
    114114                }
    115115
     
    143143}
    144144
    145 namespace Eigen { 
     145namespace Eigen {
    146146        namespace internal {
    147147
    148                 template<class Base> 
     148                template<class Base>
    149149                struct significant_decimals_default_impl< CppAD::AD<Base>, false>
    150150                {       typedef CppAD::AD<Base> Scalar;
    151151
    152                         typedef typename NumTraits<Scalar>::Real RealScalar;
    153                         static inline int run()
    154                         {       Scalar neg_log_eps = - log(
     152                        typedef typename NumTraits<Scalar>::Real RealScalar;
     153                        static inline int run()
     154                        {       Scalar neg_log_eps = - log(
    155155                                        NumTraits<RealScalar>::epsilon()
    156156                                );
     
    159159                                        ceil_neg_log_eps++;
    160160                                return ceil_neg_log_eps;
    161                         }
     161                        }
    162162                };
    163163        }
  • trunk/cppad/example/eigen_plugin.hpp

    r2572 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_EIGEN_PLUGIN_INCLUDED
    3 # define CPPAD_EIGEN_PLUGIN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EIGEN_PLUGIN_HPP
     3# define CPPAD_EIGEN_PLUGIN_HPP
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
    8 the terms of the 
     8the terms of the
    99                    Eclipse Public License Version 1.0.
    1010
  • trunk/cppad/example/matrix_mul.hpp

    r3724 r3757  
    11// $Id$
    2 # ifndef CPPAD_MATRIX_MUL_INCLUDED
    3 # define CPPAD_MATRIX_MUL_INCLUDED
     2# ifndef CPPAD_MATRIX_MUL_HPP
     3# define CPPAD_MATRIX_MUL_HPP
    44
    55/* --------------------------------------------------------------------------
     
    2020
    2121$section Matrix Multiply as an Atomic Operation$$
    22 $index multiply, matrix atomic operation$$
    23 $index atomic, matrix multiply operation$$
    24 $index matrix, multiply atomic operation$$
    2522
    2623$nospell
  • trunk/cppad/ipopt/solve.hpp

    r3232 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_SOLVE_INCLUDED
    3 # define CPPAD_SOLVE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_SOLVE_HPP
     3# define CPPAD_SOLVE_HPP
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
    8 the terms of the 
     8the terms of the
    99                    Eclipse Public License Version 1.0.
    1010
     
    6262$latex \[
    6363\begin{array}{rll}
    64 {\rm minimize}      & f (x) 
     64{\rm minimize}      & f (x)
    6565\\
    6666{\rm subject \; to} & gl \leq g(x) \leq gu
     
    6969\end{array}
    7070\] $$
    71 This is done using 
     71This is done using
    7272$href%
    7373        http://www.coin-or.org/projects/Ipopt.xml%
    7474        Ipopt
    7575%$$
    76 optimizer and CppAD for the derivative and sparsity calculations. 
     76optimizer and CppAD for the derivative and sparsity calculations.
    7777
    7878$head Include File$$
    79 Currently, this routine 
     79Currently, this routine
    8080$cref/ipopt::solve/ipopt_solve/$$ is not included by the command
    8181$codei%
     
    8484(Doing so would require the ipopt library to link
    8585the corresponding program (even if $code ipopt::solve$$) was not used.)
    86 For this reason, 
     86For this reason,
    8787if you are using $code ipopt::solve$$ you should use
    8888$codei%
     
    9393$head Bvector$$
    9494The type $icode Bvector$$ must be a $cref SimpleVector$$ class with
    95 $cref/elements of type/SimpleVector/Elements of Specified Type/$$ 
     95$cref/elements of type/SimpleVector/Elements of Specified Type/$$
    9696$code bool$$.
    9797
    9898$head Dvector$$
    9999The type $icode DVector$$ must be a $cref SimpleVector$$ class with
    100 $cref/elements of type/SimpleVector/Elements of Specified Type/$$ 
     100$cref/elements of type/SimpleVector/Elements of Specified Type/$$
    101101$code double$$.
    102102
     
    107107%$$
    108108It contains a list of options.
    109 Each option, including the last option, 
     109Each option, including the last option,
    110110is terminated by the $code '\n'$$ character.
    111111Each line consists of two or three tokens separated by one or more spaces.
     
    121121If the value is $code false$$, $code ipopt::solve$$
    122122will tape the operation sequence at the value
    123 of $icode xi$$ and use that sequence for the entire optimization process. 
     123of $icode xi$$ and use that sequence for the entire optimization process.
    124124The default value is $code false$$.
    125125
     
    131131If the value is $code true$$, $code ipopt::solve$$ will use a sparse
    132132matrix representation for the computation of Jacobians and Hessians.
    133 Otherwise, it will use a full matrix representation for 
     133Otherwise, it will use a full matrix representation for
    134134these calculations.
    135135The default for $icode value$$ is $code false$$.
     
    140140It is unclear if $cref sparse_jacobian$$ would be faster user
    141141forward or reverse mode so you are able to choose the direction.
    142 If 
     142If
    143143$codei%
    144144        %value% == true && %direction% == forward
    145145%$$
    146 the Jacobians will be calculated using $code SparseJacobianForward$$. 
    147 If 
     146the Jacobians will be calculated using $code SparseJacobianForward$$.
     147If
    148148$codei%
    149149        %value% == true && %direction% == reverse
    150150%$$
    151 the Jacobians will be calculated using $code SparseJacobianReverse$$. 
     151the Jacobians will be calculated using $code SparseJacobianReverse$$.
    152152
    153153$subhead String$$
     
    156156        String %name% %value%
    157157%$$
    158 Here $icode name$$ is any valid Ipopt string option 
     158Here $icode name$$ is any valid Ipopt string option
    159159and $icode value$$ is its setting.
    160160
     
    164164        Numeric %name% %value%
    165165%$$
    166 Here $icode name$$ is any valid Ipopt numeric option 
     166Here $icode name$$ is any valid Ipopt numeric option
    167167and $icode value$$ is its setting.
    168168
     
    172172        Integer %name% %value%
    173173%$$
    174 Here $icode name$$ is any valid Ipopt integer option 
     174Here $icode name$$ is any valid Ipopt integer option
    175175and $icode value$$ is its setting.
    176176
     
    231231$subhead ADvector$$
    232232The type $icode%FG_eval%::ADvector%$$ must be a $cref SimpleVector$$ class with
    233 $cref/elements of type/SimpleVector/Elements of Specified Type/$$ 
     233$cref/elements of type/SimpleVector/Elements of Specified Type/$$
    234234$code AD<double>$$.
    235235
     
    269269        ipopt::solve_result<%Dvector%>::status_type %solution%.status
    270270%$$
    271 It is the final Ipopt status for the optimizer. 
     271It is the final Ipopt status for the optimizer.
    272272Here is a list of the possible values for the status:
    273273
     
    283283$rnext
    284284success $cnext
    285 Algorithm terminated successfully at a point satisfying the convergence 
     285Algorithm terminated successfully at a point satisfying the convergence
    286286tolerances (see Ipopt options).
    287287$rnext
     
    293293$rnext
    294294stop_at_acceptable_point $cnext
    295 Algorithm stopped at a point that was converged, 
    296 not to the 'desired' tolerances, but to 'acceptable' tolerances 
     295Algorithm stopped at a point that was converged,
     296not to the 'desired' tolerances, but to 'acceptable' tolerances
    297297(see Ipopt options).
    298298$rnext
     
    311311$rnext
    312312error_in_step_computation $cnext
    313 An unrecoverable error occurred while Ipopt tried to 
     313An unrecoverable error occurred while Ipopt tried to
    314314compute the search direction.
    315315$rnext
    316316invalid_number_detected $cnext
    317 Algorithm received an invalid number (such as $code nan$$ or $code inf$$) 
     317Algorithm received an invalid number (such as $code nan$$ or $code inf$$)
    318318from the users function $icode%fg_info%.eval%$$ or from the CppAD evaluations
    319319of its derivatives
     
    339339%$$
    340340and its size is equal to $icode nx$$.
    341 It is the final Lagrange multipliers for the 
     341It is the final Lagrange multipliers for the
    342342lower bounds on $latex x$$.
    343343
     
    348348%$$
    349349and its size is equal to $icode nx$$.
    350 It is the final Lagrange multipliers for the 
     350It is the final Lagrange multipliers for the
    351351upper bounds on $latex x$$.
    352352
     
    365365%$$
    366366and its size is equal to $icode ng$$.
    367 It is the final value for the 
     367It is the final value for the
    368368Lagrange multipliers corresponding to the constraint function.
    369369
     
    399399$cref%example/ipopt_solve/ode_inverse.cpp%ipopt_solve_ode_inverse.cpp%$$
    400400demonstrates using Ipopt to solve for parameters in an ODE model.
    401        
     401
    402402$end
    403403-------------------------------------------------------------------------------
     
    409409/*!
    410410\file solve.hpp
    411 \brief Implement the ipopt::solve Nonlinear Programming Solver 
     411\brief Implement the ipopt::solve Nonlinear Programming Solver
    412412*/
    413413
     
    430430
    431431\param options
    432 list of options, one for each line. 
     432list of options, one for each line.
    433433Ipopt options (are optional) and have one of the following forms
    434434\code
     
    470470void solve(
    471471        const std::string&                   options   ,
    472         const Dvector&                       xi        , 
     472        const Dvector&                       xi        ,
    473473        const Dvector&                       xl        ,
    474         const Dvector&                       xu        , 
    475         const Dvector&                       gl        , 
    476         const Dvector&                       gu        , 
    477         FG_eval&                             fg_eval   , 
     474        const Dvector&                       xu        ,
     475        const Dvector&                       gl        ,
     476        const Dvector&                       gu        ,
     477        FG_eval&                             fg_eval   ,
    478478        ipopt::solve_result<Dvector>&        solution  )
    479 {       bool ok = true;
     479{       bool ok = true;
    480480
    481481        typedef typename FG_eval::ADvector ADvector;
     
    503503        bool sparse_reverse  = false;
    504504        while( begin_1 < options.size() )
    505         {       // split this line into tokens
     505        {       // split this line into tokens
    506506                while( options[begin_1] == ' ')
    507507                        begin_1++;
     
    517517
    518518                // check for errors
    519                 CPPAD_ASSERT_KNOWN( 
    520                         (end_1 != std::string::npos)  & 
    521                         (end_2 != std::string::npos)  & 
     519                CPPAD_ASSERT_KNOWN(
     520                        (end_1 != std::string::npos)  &
     521                        (end_2 != std::string::npos)  &
    522522                        (end_3 != std::string::npos)  ,
    523523                        "ipopt::solve: missing '\\n' at end of an option line"
    524524                );
    525                 CPPAD_ASSERT_KNOWN( 
     525                CPPAD_ASSERT_KNOWN(
    526526                        (end_1 > begin_1) & (end_2 > begin_2) ,
    527527                        "ipopt::solve: an option line does not have two tokens"
     
    539539                three_tok |= tok_1 == "Numeric";
    540540                three_tok |= tok_1 == "Integer";
    541                 if( three_tok ) 
    542                 {       CPPAD_ASSERT_KNOWN( 
     541                if( three_tok )
     542                {       CPPAD_ASSERT_KNOWN(
    543543                                (end_3 > begin_3) ,
    544544                                "ipopt::solve: a Sparse, String, Numeric, or Integer\n"
     
    577577                        app->Options()->SetStringValue(tok_2.c_str(), tok_3.c_str());
    578578                else if ( tok_1 == "Numeric" )
    579                 {       Ipopt::Number value = std::atof( tok_3.c_str() );       
     579                {       Ipopt::Number value = std::atof( tok_3.c_str() );
    580580                        app->Options()->SetNumericValue(tok_2.c_str(), value);
    581581                }
    582582                else if ( tok_1 == "Integer" )
    583                 {       Ipopt::Index value = std::atoi( tok_3.c_str() );       
     583                {       Ipopt::Index value = std::atoi( tok_3.c_str() );
    584584                        app->Options()->SetIntegerValue(tok_2.c_str(), value);
    585585                }
     
    600600                begin_1++;
    601601        }
    602         CPPAD_ASSERT_KNOWN( 
     602        CPPAD_ASSERT_KNOWN(
    603603                ! ( retape & (sparse_forward | sparse_reverse) ) ,
    604604                "ipopt::solve: retape and sparse both true is not supported."
     
    609609        ok    &= status == Ipopt::Solve_Succeeded;
    610610        if( ! ok )
    611         {       solution.status = solve_result<Dvector>::unknown; 
     611        {       solution.status = solve_result<Dvector>::unknown;
    612612                return;
    613613        }
     
    616616        // Note the assumption here that ADvector is same as cppd_ipopt::ADvector
    617617        size_t nf = 1;
    618         Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp = 
     618        Ipopt::SmartPtr<Ipopt::TNLP> cppad_nlp =
    619619        new CppAD::ipopt::solve_callback<Dvector, ADvector, FG_eval>(
    620                 nf, 
    621                 nx, 
    622                 ng, 
    623                 xi, 
    624                 xl, 
    625                 xu, 
    626                 gl, 
    627                 gu, 
    628                 fg_eval, 
    629                 retape, 
    630                 sparse_forward, 
    631                 sparse_reverse, 
     620                nf,
     621                nx,
     622                ng,
     623                xi,
     624                xl,
     625                xu,
     626                gl,
     627                gu,
     628                fg_eval,
     629                retape,
     630                sparse_forward,
     631                sparse_reverse,
    632632                solution
    633633        );
  • trunk/cppad/ipopt/solve_callback.hpp

    r3746 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_SOLVE_CALLBACK_INCLUDED
    3 # define CPPAD_SOLVE_CALLBACK_INCLUDED
     1// $Id$
     2# ifndef CPPAD_SOLVE_CALLBACK_HPP
     3# define CPPAD_SOLVE_CALLBACK_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/ipopt/solve_result.hpp

    r3232 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_SOLVE_RESULT_INCLUDED
    3 # define CPPAD_SOLVE_RESULT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_SOLVE_RESULT_HPP
     3# define CPPAD_SOLVE_RESULT_HPP
    44/* --------------------------------------------------------------------------
    5 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    66
    77CppAD is distributed under multiple licenses. This distribution is under
    8 the terms of the 
     8the terms of the
    99                    Eclipse Public License Version 1.0.
    1010
     
    2727*/
    2828template <class Dvector>
    29 class solve_result 
    30 {       
     29class solve_result
     30{
    3131public:
    3232        /// possible values for the result status
  • trunk/cppad/local/abort_recording.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ABORT_RECORDING_INCLUDED
    3 # define CPPAD_ABORT_RECORDING_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ABORT_RECORDING_HPP
     3# define CPPAD_ABORT_RECORDING_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1515/*
    1616$begin abort_recording$$
    17 $spell 
     17$spell
    1818$$
    1919
    2020$section Abort Recording of an Operation Sequence$$
     21$mindex tape$$
    2122
    22 $index abort, operation sequence$$
    23 $index operation, sequence abort$$
    24 $index sequence, operation abort$$
    25 $index recording, abort$$
    26 $index tape, abort recording$$
    2723
    2824$head Syntax$$
     
    4541$head Example$$
    4642The file
    47 $cref abort_recording.cpp$$ 
     43$cref abort_recording.cpp$$
    4844contains an example and test of this operation.
    4945It returns true if it succeeds and false otherwise.
  • trunk/cppad/local/abs.hpp

    r3686 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ABS_INCLUDED
    3 # define CPPAD_ABS_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ABS_HPP
     3# define CPPAD_ABS_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/abs_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ABS_OP_INCLUDED
    3 # define CPPAD_ABS_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ABS_OP_HPP
     3# define CPPAD_ABS_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/acos_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ACOS_OP_INCLUDED
    3 # define CPPAD_ACOS_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ACOS_OP_HPP
     3# define CPPAD_ACOS_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/acosh.hpp

    r3686 r3757  
    1 // $Id:$
    2 # ifndef CPPAD_ACOSH_INCLUDED
    3 # define CPPAD_ACOSH_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ACOSH_HPP
     3# define CPPAD_ACOSH_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/acosh_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ACOSH_OP_INCLUDED
    3 # define CPPAD_ACOSH_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ACOSH_OP_HPP
     3# define CPPAD_ACOSH_OP_HPP
    44# if CPPAD_USE_CPLUSPLUS_2011
    55
  • trunk/cppad/local/ad.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_INCLUDED
    3 # define CPPAD_AD_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_HPP
     3# define CPPAD_AD_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/ad_assign.hpp

    r3670 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_ASSIGN_INCLUDED
    3 # define CPPAD_AD_ASSIGN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_ASSIGN_HPP
     3# define CPPAD_AD_ASSIGN_HPP
    44
    55/* --------------------------------------------------------------------------
     
    2323$$
    2424
    25 $index assignment, AD$$
    26 $index AD, assignment$$
    27 $index assign, to AD$$
    28 $index Base, assign to AD$$
    29 $index VecAD, assign to AD$$
    3025
    3126$section AD Assignment Operator$$
     27$mindex assign Base VecAD$$
    3228
    3329$head Syntax$$
  • trunk/cppad/local/ad_binary.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_BINARY_INCLUDED
    3 # define CPPAD_AD_BINARY_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_BINARY_HPP
     3# define CPPAD_AD_BINARY_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2424
    2525$section AD Binary Arithmetic Operators$$
     26$mindex + add plus - subtract minus * multiply times / divide$$
    2627
    27 $index binary, operator$$
    28 $index operator, binary$$
    2928
    30 $index +, binary operator$$
    31 $index add, binary operator$$
    32 $index plus, binary operator$$
    3329
    34 $index -, binary operator$$
    35 $index subtract, binary operator$$
    36 $index minus, binary operator$$
    3730
    38 $index *, binary operator$$
    39 $index multiply, binary operator$$
    40 $index times, binary operator$$
    4131
    42 $index /, binary operator$$
    43 $index divide, binary operator$$
    4432
    4533
     
    4937$head Purpose$$
    5038Performs arithmetic operations where either $icode x$$ or $icode y$$
    51 has type 
     39has type
    5240$codei%AD<%Base%>%$$ or
    53 $cref%VecAD<Base>::reference%VecAD%VecAD<Base>::reference%$$. 
     41$cref%VecAD<Base>::reference%VecAD%VecAD<Base>::reference%$$.
    5442
    5543$head Op$$
     
    6048$code -$$   $cnext $icode z$$ is $icode x$$ minus $icode y$$ $rnext
    6149$code *$$   $cnext $icode z$$ is $icode x$$ times $icode y$$ $rnext
    62 $code /$$   $cnext $icode z$$ is $icode x$$ divided by $icode y$$ 
     50$code /$$   $cnext $icode z$$ is $icode x$$ divided by $icode y$$
    6351$tend
    6452
     
    10290$cref/AD of Base/glossary/AD of Base/$$ operation
    10391and hence it is part of the current
    104 AD of $icode Base$$ 
     92AD of $icode Base$$
    10593$cref/operation sequence/glossary/Operation/Sequence/$$.
    10694
     
    123111
    124112$head Derivative$$
    125 If $latex f$$ and $latex g$$ are 
     113If $latex f$$ and $latex g$$ are
    126114$cref/Base functions/glossary/Base Function/$$
    127115
     
    143131$subhead Division$$
    144132$latex \[
    145         \D{[ f(x) / g(x) ]}{x} = 
     133        \D{[ f(x) / g(x) ]}{x} =
    146134                [1/g(x)] * \D{f(x)}{x} - [f(x)/g(x)^2] * \D{g(x)}{x}
    147135\] $$
    148136
    149 $end 
     137$end
    150138-----------------------------------------------------------------------------
    151139*/
  • trunk/cppad/local/ad_ctor.hpp

    r3740 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_CTOR_INCLUDED
    3 # define CPPAD_AD_CTOR_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_CTOR_HPP
     3# define CPPAD_AD_CTOR_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/ad_fun.hpp

    r3744 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_FUN_INCLUDED
    3 # define CPPAD_AD_FUN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_FUN_HPP
     3# define CPPAD_AD_FUN_HPP
    44
    55/* --------------------------------------------------------------------------
     
    3232$section ADFun Objects$$
    3333
    34 $index ADFun, object$$
    35 $index object, ADFun$$
    3634
    3735$head Purpose$$
  • trunk/cppad/local/ad_io.hpp

    r3232 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_IO_INCLUDED
    3 # define CPPAD_AD_IO_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_IO_HPP
     3# define CPPAD_AD_IO_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2323$$
    2424
    25 $index >>, AD input$$
    26 $index AD, stream input$$
    27 $index input, AD$$
    28 $index stream, AD input$$
    29 $index write, AD$$
    30 
    31 $section AD Output Stream Operator$$
     25
     26$section AD Output Stream Operator$$
     27$mindex >> input write$$
    3228
    3329$head Syntax$$
     
    6864%$$
    6965will first read the $icode Base$$ value of $icode x$$ from $icode is$$,
    70 and then read the $icode Base$$ value to $icode y$$. 
     66and then read the $icode Base$$ value to $icode y$$.
    7167
    7268$head Operation Sequence$$
     
    9692$$
    9793
    98 $index <<, AD output$$
    99 $index AD, stream output$$
    100 $index output, AD$$
    101 $index stream, AD output$$
    102 $index write, AD$$
    103 
    104 $section AD Output Stream Operator$$
     94
     95$section AD Output Stream Operator$$
     96$mindex <<$$
    10597
    10698$head Syntax$$
     
    143135%$$
    144136will output the value corresponding to $icode x$$
    145 followed by the value corresponding to $icode y$$. 
     137followed by the value corresponding to $icode y$$.
    146138
    147139$head Operation Sequence$$
     
    180172
    181173\param x [out]
    182 is the object that is being set to a value. 
     174is the object that is being set to a value.
    183175Upone return, x.value_ is read from the input stream
    184176and x.tape_is_ is zero; i.e., x is a parameter.
     
    190182        x.tape_id_ = 0;
    191183        CPPAD_ASSERT_UNKNOWN( Parameter(x) );
    192         return (is >> x.value_);
     184        return (is >> x.value_);
    193185}
    194186// ---------------------------------------------------------------------------
     
    204196\param x
    205197is the object that is being written to the output stream.
    206 This is equivalent to writing x.value_ to the output stream. 
     198This is equivalent to writing x.value_ to the output stream.
    207199*/
    208200template <class Base>
    209201CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    210202std::ostream& operator << (std::ostream &os, const AD<Base> &x)
    211 {       return (os << x.value_); }
     203{       return (os << x.value_); }
    212204// ---------------------------------------------------------------------------
    213205/*!
     
    222214\param x
    223215is the element of the VecAD object that is being written to the output stream.
    224 This is equivalent to writing the corresponing Base value to the stream. 
     216This is equivalent to writing the corresponing Base value to the stream.
    225217*/
    226218template <class Base>
    227219CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    228220std::ostream& operator << (std::ostream &os, const VecAD_reference<Base> &x)
    229 {       return (os << x.ADBase()); }
     221{       return (os << x.ADBase()); }
    230222
    231223} // END_CPPAD_NAMESPACE
  • trunk/cppad/local/ad_tape.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_TAPE_INCLUDED
    3 # define CPPAD_AD_TAPE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_TAPE_HPP
     3# define CPPAD_AD_TAPE_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/ad_valued.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AD_VALUED_INCLUDED
    3 # define CPPAD_AD_VALUED_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AD_VALUED_HPP
     3# define CPPAD_AD_VALUED_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/add.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ADD_INCLUDED
    3 # define CPPAD_ADD_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ADD_HPP
     3# define CPPAD_ADD_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    9595} // END CppAD namespace
    9696
    97 # endif 
     97# endif
  • trunk/cppad/local/add_eq.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ADD_EQ_INCLUDED
    3 # define CPPAD_ADD_EQ_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ADD_EQ_HPP
     3# define CPPAD_ADD_EQ_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2020AD<Base>& AD<Base>::operator += (const AD<Base> &right)
    2121{
    22         // compute the Base part 
     22        // compute the Base part
    2323        Base left;
    2424        left    = value_;
     
    9090} // END CppAD namespace
    9191
    92 # endif 
     92# endif
  • trunk/cppad/local/add_op.hpp

    r3321 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ADD_OP_INCLUDED
    3 # define CPPAD_ADD_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ADD_OP_HPP
     3# define CPPAD_ADD_OP_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    3737template <class Base>
    3838inline void forward_addvv_op(
    39         size_t        p           , 
    40         size_t        q           , 
     39        size_t        p           ,
     40        size_t        q           ,
    4141        size_t        i_z         ,
    4242        const addr_t* arg         ,
     
    7575template <class Base>
    7676inline void forward_addvv_op_dir(
    77         size_t        q           , 
    78         size_t        r           , 
     77        size_t        q           ,
     78        size_t        r           ,
    7979        size_t        i_z         ,
    8080        const addr_t* arg         ,
     
    150150template <class Base>
    151151inline void reverse_addvv_op(
    152         size_t        d           , 
     152        size_t        d           ,
    153153        size_t        i_z         ,
    154154        const addr_t* arg         ,
     
    194194template <class Base>
    195195inline void forward_addpv_op(
    196         size_t        p           , 
    197         size_t        q           , 
     196        size_t        p           ,
     197        size_t        q           ,
    198198        size_t        i_z         ,
    199199        const addr_t* arg         ,
     
    235235template <class Base>
    236236inline void forward_addpv_op_dir(
    237         size_t        q           , 
    238         size_t        r           , 
     237        size_t        q           ,
     238        size_t        r           ,
    239239        size_t        i_z         ,
    240240        const addr_t* arg         ,
     
    308308template <class Base>
    309309inline void reverse_addpv_op(
    310         size_t        d           , 
     310        size_t        d           ,
    311311        size_t        i_z         ,
    312312        const addr_t* arg         ,
  • trunk/cppad/local/arithmetic.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ARITHMETIC_INCLUDED
    3 # define CPPAD_ARITHMETIC_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ARITHMETIC_HPP
     3# define CPPAD_ARITHMETIC_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2222$$
    2323
    24 $index operator, AD arithmetic$$
    25 $index AD, arithmetic operator$$
    26 $index arithmetic, AD operator$$
    2724
    28 $index computed, AD assignment$$
    29 $index assignment, AD computed$$
    30 $index AD, computed assignment$$
    3125
    3226$section AD Arithmetic Operators and Computed Assignments$$
  • trunk/cppad/local/asin_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ASIN_OP_INCLUDED
    3 # define CPPAD_ASIN_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ASIN_OP_HPP
     3# define CPPAD_ASIN_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/asinh.hpp

    r3686 r3757  
    1 // $Id:$
    2 # ifndef CPPAD_ASINH_INCLUDED
    3 # define CPPAD_ASINH_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ASINH_HPP
     3# define CPPAD_ASINH_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/asinh_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ASINH_OP_INCLUDED
    3 # define CPPAD_ASINH_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ASINH_OP_HPP
     3# define CPPAD_ASINH_OP_HPP
    44# if CPPAD_USE_CPLUSPLUS_2011
    55
  • trunk/cppad/local/atan2.hpp

    r3083 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ATAN2_INCLUDED
    3 # define CPPAD_ATAN2_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ATAN2_HPP
     3# define CPPAD_ATAN2_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2626$$
    2727
    28 $index tan, AD inverse$$
    29 $index inverse, AD tan$$
    30 $index atan2, AD$$
    3128
    3229$section AD Two Argument Inverse Tangent Function$$
     30$mindex tan atan2$$
    3331
    3432$head Syntax$$
     
    3836$head Purpose$$
    3937Determines an angle $latex \theta \in [ - \pi , + \pi ]$$
    40 such that 
     38such that
    4139$latex \[
    4240\begin{array}{rcl}
     
    5149        const AD<%Base%>               &%y%
    5250        const VecAD<%Base%>::reference &%y%
    53 %$$ 
     51%$$
    5452
    5553$head x$$
     
    5856        const AD<%Base%>               &%x%
    5957        const VecAD<%Base%>::reference &%x%
    60 %$$ 
     58%$$
    6159
    6260$head theta$$
     
    7876The file
    7977$cref atan2.cpp$$
    80 contains an example and test of this function.   
     78contains an example and test of this function.
    8179It returns true if it succeeds and false otherwise.
    8280
     
    109107
    110108        // if( ax > ay )
    111         //      theta = atan(ay / ax);
     109        //      theta = atan(ay / ax);
    112110        // else theta = pi2 - atan(ax / ay);
    113111        alpha = atan(ay / ax);
     
    116114
    117115        // if( x <= 0 )
    118         //      theta = pi - theta;
     116        //      theta = pi - theta;
    119117        theta = CondExpLe(x, zero, pi - theta, theta);  // use of CondExp
    120        
     118
    121119        // if( y <= 0 )
    122         //      theta = - theta;
     120        //      theta = - theta;
    123121        theta = CondExpLe(y, zero, -theta, theta);      // use of CondExp
    124122
    125123        return theta;
    126124}
    127 // END CondExp 
     125// END CondExp
    128126
    129127template <class Base>
     
    136134
    137135template <class Base>
    138 inline AD<Base> atan2 
     136inline AD<Base> atan2
    139137(const VecAD_reference<Base> &y, const VecAD_reference<Base> &x)
    140138{       return atan2( y.ADBase() , x.ADBase() ); }
     
    142140} // END CppAD namespace
    143141
    144 # endif 
     142# endif
  • trunk/cppad/local/atan_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ATAN_OP_INCLUDED
    3 # define CPPAD_ATAN_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ATAN_OP_HPP
     3# define CPPAD_ATAN_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/atanh.hpp

    r3686 r3757  
    1 // $Id:$
    2 # ifndef CPPAD_ATANH_INCLUDED
    3 # define CPPAD_ATANH_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ATANH_HPP
     3# define CPPAD_ATANH_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/atanh_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ATANH_OP_INCLUDED
    3 # define CPPAD_ATANH_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ATANH_OP_HPP
     3# define CPPAD_ATANH_OP_HPP
    44# if CPPAD_USE_CPLUSPLUS_2011
    55
  • trunk/cppad/local/atomic_base.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ATOMIC_BASE_INCLUDED
    3 # define CPPAD_ATOMIC_BASE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ATOMIC_BASE_HPP
     3# define CPPAD_ATOMIC_BASE_HPP
    44
    55/* --------------------------------------------------------------------------
     
    1717# include <cppad/local/cppad_assert.hpp>
    1818// needed before one can use CPPAD_ASSERT_FIRST_CALL_NOT_PARALLEL
    19 # include <cppad/thread_alloc.hpp>
     19# include <cppad/utility/thread_alloc.hpp>
    2020
    2121namespace CppAD { // BEGIN_CPPAD_NAMESPACE
     
    344344
    345345$section Using AD Version of Atomic Function$$
    346 $index atomic, use function$$
    347346
    348347$head Syntax$$
     
    577576
    578577$section Atomic Forward Mode$$
    579 $index atomic, forward callback$$
    580 $index forward, atomic callback$$
    581 $index forward, atomic virtual$$
     578$mindex callback virtual$$
    582579
    583580
     
    810807
    811808$section Atomic Reverse Mode$$
    812 $index atomic, reverse callback$$
    813 $index reverse, atomic callback$$
    814 $index reverse, atomic virtual$$
    815809$spell
    816810        bool
     
    10261020
    10271021$section Atomic Forward Jacobian Sparsity Patterns$$
    1028 $index atomic, for_sparse_jac callback$$
    1029 $index for_sparse_jac, atomic callback$$
    1030 $index for_sparse_jac, atomic virtual$$
    10311022
    10321023$head Syntax$$
     
    11511142
    11521143$section Atomic Reverse Jacobian Sparsity Patterns$$
    1153 $index atomic, rev_sparse_jac callback$$
    1154 $index rev_sparse_jac, atomic callback$$
    1155 $index rev_sparse_jac, atomic virtual$$
    11561144
    11571145$head Syntax$$
     
    12771265
    12781266$section Atomic Reverse Hessian Sparsity Patterns$$
    1279 $index atomic, rev_sparse_hes callback$$
    1280 $index rev_sparse_hes, atomic callback$$
    1281 $index rev_sparse_hes, atomic virtual$$
    12821267
    12831268$head Syntax$$
     
    14941479
    14951480$section Free Static Variables$$
    1496 $index free, atomic static$$
    1497 $index atomic, free static$$
    1498 $index static, free atomic$$
    1499 $index clear, atomic static$$
     1481$mindex clear$$
    15001482
    15011483$head Syntax$$
  • trunk/cppad/local/azmul.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_AZMUL_INCLUDED
    3 # define CPPAD_AZMUL_INCLUDED
     1// $Id$
     2# ifndef CPPAD_AZMUL_HPP
     3# define CPPAD_AZMUL_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/base_complex.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_COMPLEX_INCLUDED
    3 # define CPPAD_BASE_COMPLEX_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_COMPLEX_HPP
     3# define CPPAD_BASE_COMPLEX_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     
    1717
    1818// needed before one can use CPPAD_ASSERT_FIRST_CALL_NOT_PARALLEL
    19 # include <cppad/thread_alloc.hpp>
     19# include <cppad/utility/thread_alloc.hpp>
    2020
    2121/*
  • trunk/cppad/local/base_cond_exp.hpp

    r3232 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_COND_EXP_INCLUDED
    3 # define CPPAD_BASE_COND_EXP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_COND_EXP_HPP
     3# define CPPAD_BASE_COND_EXP_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1414-------------------------------------------------------------------------- */
    1515
    16 /* 
     16/*
    1717$begin base_cond_exp$$
    1818$spell
     
    3838
    3939$section Base Type Requirements for Conditional Expressions$$
    40 $index CondExp, base require$$
    41 $index base, CondExp require$$
    42 $index require, base CondExp$$
     40$mindex CondExp require CPPAD_COND_EXP_REL$$
    4341
    4442$head Purpose$$
    45 These definitions are required by the user's code to support the 
     43These definitions are required by the user's code to support the
    4644$codei%AD<%Base%>%$$ type for $cref CondExp$$ operations:
    4745
     
    5149namespace CppAD {
    5250        // The conditional expression operator enum type
    53         enum CompareOp 
     51        enum CompareOp
    5452        {       CompareLt, // less than
    5553                CompareLe, // less than or equal
     
    6967        )
    7068%$$
    71 which computes implements the corresponding $cref CondExp$$ 
     69which computes implements the corresponding $cref CondExp$$
    7270function when the result has prototype
    7371$codei%
     
    7775$codei%
    7876        enum CppAD::CompareOp %cop%
    79 %$$ 
     77%$$
    8078The other arguments have the prototype
    8179$codei%
    82         const %Base%&  %left% 
    83         const %Base%&  %right% 
     80        const %Base%&  %left%
     81        const %Base%&  %right%
    8482        const %Base%&  %exp_if_true%
    85         const %Base%&  %exp_if_false% 
     83        const %Base%&  %exp_if_false%
    8684%$$
    8785
     
    104102}
    105103%$$
    106 For example, see 
     104For example, see
    107105$cref/double CondExpOp/base_alloc.hpp/CondExpOp/$$.
    108106For an example of and implementation of $code CondExpOp$$ with
    109107a more involved $icode Base$$ type see
    110108$cref/adolc CondExpOp/base_adolc.hpp/CondExpOp/$$.
    111  
     109
    112110
    113111$subhead Not Ordered$$
     
    131129For example, see
    132130$cref/complex CondExpOp/base_complex.hpp/CondExpOp/$$.
    133  
     131
    134132$head CondExpRel$$
    135 $index CPPAD_COND_EXP_REL$$
    136133The macro invocation
    137134$codei%
     
    235232*/
    236233template <class CompareType, class ResultType>
    237 ResultType CondExpTemplate( 
     234ResultType CondExpTemplate(
    238235        enum  CompareOp            cop          ,
    239236        const CompareType&         left         ,
    240         const CompareType&         right        , 
    241         const ResultType&          exp_if_true  , 
     237        const CompareType&         right        ,
     238        const ResultType&          exp_if_true  ,
    242239        const ResultType&          exp_if_false )
    243240{       ResultType returnValue;
  • trunk/cppad/local/base_double.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_DOUBLE_INCLUDED
    3 # define CPPAD_BASE_DOUBLE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_DOUBLE_HPP
     3# define CPPAD_BASE_DOUBLE_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/local/base_float.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_FLOAT_INCLUDED
    3 # define CPPAD_BASE_FLOAT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_FLOAT_HPP
     3# define CPPAD_BASE_FLOAT_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/local/base_limits.hpp

    r3738 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_LIMITS_INCLUDED
    3 # define CPPAD_BASE_LIMITS_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_LIMITS_HPP
     3# define CPPAD_BASE_LIMITS_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/base_std_math.hpp

    r3738 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BASE_STD_MATH_INCLUDED
    3 # define CPPAD_BASE_STD_MATH_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BASE_STD_MATH_HPP
     3# define CPPAD_BASE_STD_MATH_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/bender_quad.hpp

    r2859 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BENDER_QUAD_INCLUDED
    3 # define CPPAD_BENDER_QUAD_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BENDER_QUAD_HPP
     3# define CPPAD_BENDER_QUAD_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    3131
    3232
    33 $index Hessian, Bender$$
    34 $index Jacobian, Bender$$
    35 $index BenderQuad$$
    3633$section Computing Jacobian and Hessian of Bender's Reduced Objective$$
     34$mindex BenderQuad$$
    3735
    3836$head Syntax$$
    3937$codei%
    4038# include <cppad/cppad.hpp>
    41 BenderQuad(%x%, %y%, %fun%, %g%, %gx%, %gxx%)%$$ 
     39BenderQuad(%x%, %y%, %fun%, %g%, %gx%, %gxx%)%$$
    4240
    4341$head See Also$$
     
    4644$head Problem$$
    4745The type $cref/ADvector/BenderQuad/ADvector/$$ cannot be determined
    48 form the arguments above 
    49 (currently the type $icode ADvector$$ must be 
     46form the arguments above
     47(currently the type $icode ADvector$$ must be
    5048$codei%CPPAD_TESTVECTOR(%Base%)%$$.)
    5149This will be corrected in the future by requiring $icode Fun$$
     
    6260that is convex with respect to $latex y$$.
    6361In addition, we are given a set of equations $latex H(x, y)$$
    64 such that 
     62such that
    6563$latex \[
    6664        H[ x , Y(x) ] = 0 \;\; \Rightarrow \;\; F_y [ x , Y(x) ] = 0
     
    7169        dy = - [ \partial_y H(x, y)]^{-1} H(x, y)
    7270\] $$
    73 The purpose of this routine is to compute the 
     71The purpose of this routine is to compute the
    7472value, Jacobian, and Hessian of the reduced objective function
    7573$latex \[
     
    8078$latex \[
    8179        G^{(1)} (x) = \partial_x F [x, Y(x) ]
    82 \] $$ 
     80\] $$
    8381
    8482$head x$$
     
    8987(see $cref/BAvector/BenderQuad/BAvector/$$ below)
    9088and its size must be equal to $icode n$$.
    91 It specifies the point at which we evaluating 
     89It specifies the point at which we evaluating
    9290the reduced objective function and its derivatives.
    9391
     
    9997%$$
    10098and its size must be equal to $icode m$$.
    101 It must be equal to $latex Y(x)$$; i.e., 
     99It must be equal to $latex Y(x)$$; i.e.,
    102100it must solve the problem in $latex y$$ for this given value of $latex x$$
    103101$latex \[
     
    108106
    109107$head fun$$
    110 The $code BenderQuad$$ object $icode fun$$ 
     108The $code BenderQuad$$ object $icode fun$$
    111109must support the member functions listed below.
    112110The $codei%AD<%Base%>%$$ arguments will be variables for
    113111a tape created by a call to $cref Independent$$ from $code BenderQuad$$
    114 (hence they can not be combined with variables corresponding to a 
    115 different tape). 
     112(hence they can not be combined with variables corresponding to a
     113different tape).
    116114
    117115$subhead fun.f$$
     
    178176%$$
    179177and its size must be equal to $icode n$$.
    180 Its value will be exactly equal to the $code BenderQuad$$ argument 
     178Its value will be exactly equal to the $code BenderQuad$$ argument
    181179$icode x$$ and values depending on it can be stored as private objects
    182180in $icode f$$ and need not be recalculated.
     
    190188%$$
    191189and its size must be equal to $icode m$$.
    192 Its value will be exactly equal to the $code BenderQuad$$ argument 
     190Its value will be exactly equal to the $code BenderQuad$$ argument
    193191$icode y$$ and values depending on it can be stored as private objects
    194192in $icode f$$ and need not be recalculated.
     
    218216$latex dy$$ is the Newton step for finding a zero
    219217of $latex H(x, y)$$ with respect to $latex y$$;
    220 i.e., 
     218i.e.,
    221219$latex y + dy$$ is an approximate solution for the equation
    222 $latex H (x, y + dy) = 0$$. 
     220$latex H (x, y + dy) = 0$$.
    223221
    224222$head g$$
     
    244242On output,
    245243it contains the Jacobian of $latex G (x)$$; i.e.,
    246 for $latex j = 0 , \ldots , n-1$$, 
     244for $latex j = 0 , \ldots , n-1$$,
    247245$latex \[
    248246        gx[ j ] = G^{(1)} (x)_j
     
    259257it contains the Hessian of $latex G (x)$$; i.e.,
    260258for $latex i = 0 , \ldots , n-1$$, and
    261 $latex j = 0 , \ldots , n-1$$, 
     259$latex j = 0 , \ldots , n-1$$,
    262260$latex \[
    263261        gxx[ i * n + j ] = G^{(2)} (x)_{i,j}
     
    265263
    266264$head BAvector$$
    267 The type $icode BAvector$$ must be a 
    268 $cref SimpleVector$$ class. 
    269 We use $icode Base$$ to refer to the type of the elements of 
     265The type $icode BAvector$$ must be a
     266$cref SimpleVector$$ class.
     267We use $icode Base$$ to refer to the type of the elements of
    270268$icode BAvector$$; i.e.,
    271269$codei%
     
    274272
    275273$head ADvector$$
    276 The type $icode ADvector$$ must be a 
    277 $cref SimpleVector$$ class with elements of type 
     274The type $icode ADvector$$ must be a
     275$cref SimpleVector$$ class with elements of type
    278276$codei%AD<%Base%>%$$; i.e.,
    279277$codei%
     
    292290The file
    293291$cref bender_quad.cpp$$
    294 contains an example and test of this operation.   
     292contains an example and test of this operation.
    295293It returns true if it succeeds and false otherwise.
    296294
     
    304302template <class BAvector, class Fun>
    305303void BenderQuad(
    306         const BAvector   &x     , 
    307         const BAvector   &y     , 
    308         Fun               fun   , 
     304        const BAvector   &x     ,
     305        const BAvector   &y     ,
     306        Fun               fun   ,
    309307        BAvector         &g     ,
    310308        BAvector         &gx    ,
     
    344342        for(j = 0; j < n; j++)
    345343                vx[j] = x[j];
    346        
     344
    347345        // declare the independent variables
    348346        Independent(vx);
    349347
    350         // evaluate h = H(x, y) 
     348        // evaluate h = H(x, y)
    351349        ADvector h(m);
    352350        h = fun.h(vx, y);
     
    361359                vy[j] = y[j] + dy[j];
    362360
    363         // evaluate G~ (x) = F [ x , y + dy(x) ] 
     361        // evaluate G~ (x) = F [ x , y + dy(x) ]
    364362        ADvector gtilde(1);
    365363        gtilde = fun.f(vx, vy);
     
    368366        // We will make heavy use of this tape, so optimize it
    369367        ADFun<Base> Gtilde;
    370         Gtilde.Dependent(vx, gtilde); 
     368        Gtilde.Dependent(vx, gtilde);
    371369        Gtilde.optimize();
    372370
     
    402400        return;
    403401}
    404        
     402
    405403} // END CppAD namespace
    406404
  • trunk/cppad/local/bool_fun.hpp

    r3740 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BOOL_FUN_INCLUDED
    3 # define CPPAD_BOOL_FUN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BOOL_FUN_HPP
     3# define CPPAD_BOOL_FUN_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/bool_valued.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_BOOL_VALUED_INCLUDED
    3 # define CPPAD_BOOL_VALUED_INCLUDED
     1// $Id$
     2# ifndef CPPAD_BOOL_VALUED_HPP
     3# define CPPAD_BOOL_VALUED_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-06 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2020$$
    2121
    22 $index operation, AD Bool valued$$
    23 $index function, AD Bool valued$$
    2422
    2523$section Bool Valued Operations and Functions with AD Arguments$$
     
    3937$rref EqualOpSeq$$
    4038$tend
    41        
     39
    4240
    4341$end
  • trunk/cppad/local/capacity_order.hpp

    r3301 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CAPACITY_ORDER_INCLUDED
    3 # define CPPAD_CAPACITY_ORDER_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CAPACITY_ORDER_HPP
     3# define CPPAD_CAPACITY_ORDER_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2323$$
    2424
    25 $index Forward, capacity$$
    26 $index capacity_order$$
    27 $index capacity, Forward$$
    28 $index control, memory$$
    29 $index memory, control$$
    3025
    3126$section Controlling Taylor Coefficients Memory Allocation$$
     27$mindex Forward capacity_order control$$
    3228
    3329$head Syntax$$
     
    3935$head Purpose$$
    4036The Taylor coefficients calculated by $cref Forward$$ mode calculations
    41 are retained in an $cref ADFun$$ object for subsequent use during 
     37are retained in an $cref ADFun$$ object for subsequent use during
    4238$cref Reverse$$ mode and higher order Forward mode calculations.
    4339For example, a call to $cref/Forward/forward_order/$$ with the syntax
     
    4642%$$
    4743where $icode%q% > 0%$$ and  $code%xq%.size() == %f%.Domain()%$$,
    48 uses the lower order Taylor coefficients and 
     44uses the lower order Taylor coefficients and
    4945computes the $th q$$ order Taylor coefficients for all
    5046the variables in the operation sequence corresponding to $icode f$$.
    51 The $code capacity_order$$ operation allows you to control that 
    52 amount of memory that is retained by an AD function object 
     47The $code capacity_order$$ operation allows you to control that
     48amount of memory that is retained by an AD function object
    5349(to hold $code Forward$$ results for subsequent calculations).
    5450
     
    6460        size_t %c%
    6561%$$
    66 It specifies the number of Taylor coefficient orders that are allocated 
     62It specifies the number of Taylor coefficient orders that are allocated
    6763in the AD operation sequence corresponding to $icode f$$.
    6864
    6965$subhead Pre-Allocating Memory$$
    70 If you plan to make calls to $code Forward$$ with the maximum value of 
     66If you plan to make calls to $code Forward$$ with the maximum value of
    7167$icode q$$ equal to $icode Q$$,
    7268it should be faster to pre-allocate memory for these calls using
     
    8177$$
    8278Note that each call to $cref Dependent$$ frees the old memory
    83 connected to the function object and sets the corresponding 
     79connected to the function object and sets the corresponding
    8480taylor capacity to zero.
    8581
    8682$subhead Freeing Memory$$
    8783If you no longer need the Taylor coefficients of order $icode q$$
    88 and higher (that are stored in $icode f$$), 
     84and higher (that are stored in $icode f$$),
    8985you can reduce the memory allocated to $icode f$$ using
    9086$codei%
     
    9288%$$
    9389with $icode c$$ equal to $icode q$$.
    94 Note that, if $cref ta_hold_memory$$ is true, this memory is not actually 
    95 returned to the system, but rather held for future use by the same thread. 
     90Note that, if $cref ta_hold_memory$$ is true, this memory is not actually
     91returned to the system, but rather held for future use by the same thread.
    9692
    9793$head Original State$$
     
    10096        ADFun<%Base%> %f%(%x%, %y%)
    10197%$$,
    102 there is an implicit call to $cref forward_zero$$ with $icode xq$$ equal to 
     98there is an implicit call to $cref forward_zero$$ with $icode xq$$ equal to
    10399the value of the
    104 $cref/independent variables/glossary/Tape/Independent Variable/$$ 
     100$cref/independent variables/glossary/Tape/Independent Variable/$$
    105101when the AD operation sequence was recorded.
    106102This corresponds to $icode%c% == 1%$$.
     
    110106%$$
    111107$head Example$$
    112 The file 
     108The file
    113109$cref capacity_order.cpp$$
    114110contains an example and test of these operations.
     
    143139is the number of directions to allocate memory for.
    144140If <code>c == 1</code> then \c r must also be one.
    145 In all cases, it must hold that 
     141In all cases, it must hold that
    146142<code>
    147143        r == num_direction_taylor_ || num_order_taylor <= 1
     
    163159        size_t i, k, ell;
    164160
    165         if( (c == cap_order_taylor_) & (r == num_direction_taylor_) ) 
     161        if( (c == cap_order_taylor_) & (r == num_direction_taylor_) )
    166162                return;
    167163
     
    175171        }
    176172        CPPAD_ASSERT_UNKNOWN(r==num_direction_taylor_ || num_order_taylor_<=1);
    177        
    178         // Allocate new taylor with requested number of orders and directions 
     173
     174        // Allocate new taylor with requested number of orders and directions
    179175        size_t new_len   = ( (c-1)*r + 1 ) * num_var_tape_;
    180176        pod_vector<Base> new_taylor;
     
    228224\param c
    229225is the number of orders to allocate memory for.
    230 If <code>c == 0</code>, 
     226If <code>c == 0</code>,
    231227num_order_taylor_, cap_order_taylor_, and num_direction_taylor_
    232228are all set to zero.
     
    260256
    261257} // END CppAD namespace
    262        
     258
    263259
    264260# endif
  • trunk/cppad/local/check_for_nan.hpp

    r3756 r3757  
    11// $Id$
    2 # ifndef CPPAD_CHECK_FOR_NAN_INCLUDED
    3 # define CPPAD_CHECK_FOR_NAN_INCLUDED
     2# ifndef CPPAD_CHECK_FOR_NAN_HPP
     3# define CPPAD_CHECK_FOR_NAN_HPP
    44
    55/* --------------------------------------------------------------------------
     
    133133*/
    134134
    135 # include <cppad/vector.hpp>
     135# include <cppad/utility/vector.hpp>
    136136# include <cppad/configure.hpp>
    137137# include <fstream>
  • trunk/cppad/local/checkpoint.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CHECKPOINT_INCLUDED
    3 # define CPPAD_CHECKPOINT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CHECKPOINT_HPP
     3# define CPPAD_CHECKPOINT_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/color_general.hpp

    r3683 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COLOR_GENERAL_INCLUDED
    3 # define CPPAD_COLOR_GENERAL_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COLOR_GENERAL_HPP
     3# define CPPAD_COLOR_GENERAL_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/color_symmetric.hpp

    r3565 r3757  
    11// $Id$
    2 # ifndef CPPAD_COLOR_SYMMETRIC_INCLUDED
    3 # define CPPAD_COLOR_SYMMETRIC_INCLUDED
     2# ifndef CPPAD_COLOR_SYMMETRIC_HPP
     3# define CPPAD_COLOR_SYMMETRIC_HPP
    44
    55# include <cppad/configure.hpp>
     
    99
    1010CppAD is distributed under multiple licenses. This distribution is under
    11 the terms of the 
     11the terms of the
    1212                    Eclipse Public License Version 1.0.
    1313
     
    2121// --------------------------------------------------------------------------
    2222/*!
    23 CppAD algorithm for determining which rows of a symmetric sparse matrix can be 
     23CppAD algorithm for determining which rows of a symmetric sparse matrix can be
    2424computed together.
    2525
     
    5151\n
    5252sets m to the number of rows (and columns) in the sparse matrix.
    53 All of the row indices are less than this value. 
     53All of the row indices are less than this value.
    5454\n
    5555<code>n = pattern.end()</code>
     
    5757sets n to the number of columns in the sparse matrix
    5858(which must be equal to the number of rows).
    59 All of the column indices are less than this value. 
     59All of the column indices are less than this value.
    6060\n
    6161<code>pattern.begin(i)</code>
     
    6464\n
    6565<code>j = pattern.next_element()</code>
    66 Sets j to the next possibly non-zero column 
     66Sets j to the next possibly non-zero column
    6767in the row specified by the previous call to <code>pattern.begin</code>.
    6868If there are no more such columns, the value
     
    102102\n
    103103Fix any (i, j) in the sparsity pattern.
    104 Suppose that there is a row index i1 with 
     104Suppose that there is a row index i1 with
    105105i1 != i, color[i1] == color[i] and (i1, j) is in the sparsity pattern.
    106106If follows that for all j1 with
     
    174174
    175175                // -----------------------------------------------------
    176                 // Forbid grouping with rows that would destroy results that are 
     176                // Forbid grouping with rows that would destroy results that are
    177177                // needed for this row.
    178178                itr1 = pair_needed[i1].begin();
     
    233233        }
    234234
    235         // determine which sparsity entries need to be reflected 
     235        // determine which sparsity entries need to be reflected
    236236        for(k1 = 0; k1 < row.size(); k1++)
    237237        {       i1   = row[k1];
     
    252252// --------------------------------------------------------------------------
    253253/*!
    254 Colpack algorithm for determining which rows of a symmetric sparse matrix 
     254Colpack algorithm for determining which rows of a symmetric sparse matrix
    255255can be computed together.
    256256
     
    268268        return;
    269269# else
    270         size_t i, j, k; 
     270        size_t i, j, k;
    271271        size_t m = pattern.n_set();
    272272        CPPAD_ASSERT_UNKNOWN( m == pattern.end() );
     
    310310        cppad_colpack_symmetric(color, m, adolc_pattern);
    311311
    312         // determine which sparsity entries need to be reflected 
     312        // determine which sparsity entries need to be reflected
    313313        size_t i1, i2, j1, j2, k1, k2;
    314314        for(k1 = 0; k1 < row.size(); k1++)
     
    318318                for(i2 = 0; i2 < m; i2++) if( (i1 != i2) & (color[i1]==color[i2]) )
    319319                {       for(k2 = 1; k2 <= adolc_pattern[i2][0]; k2++)
    320                         {       j2 = adolc_pattern[i2][k2];     
     320                        {       j2 = adolc_pattern[i2][k2];
    321321                                reflect |= (j1 == j2);
    322322                        }
  • trunk/cppad/local/comp_op.hpp

    r3607 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COMP_OP_INCLUDED
    3 # define CPPAD_COMP_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COMP_OP_HPP
     3# define CPPAD_COMP_OP_HPP
    44
    55/* --------------------------------------------------------------------------
     
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    105105\param arg
    106106taylor[ arg[0] * cap_order + 0 ] is the zero order Taylor coefficient
    107 for the left operand and 
     107for the left operand and
    108108taylor[ arg[1] * cap_order + 0 ] is the zero order Taylor coefficient
    109109for the right operand.
  • trunk/cppad/local/compare.hpp

    r3607 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COMPARE_INCLUDED
    3 # define CPPAD_COMPARE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COMPARE_HPP
     3# define CPPAD_COMPARE_HPP
    44
    55/* --------------------------------------------------------------------------
     
    2424$$
    2525
    26 $index binary, AD compare operator$$
    27 $index AD, binary compare operator$$
    28 $index compare, AD binary operator$$
    29 $index operator, AD binary compare$$
    30 
    31 $index <, AD operator$$
    32 $index <=, AD operator$$
    33 $index >, AD operator$$
    34 $index >=, AD operator$$
    35 $index ==, AD operator$$
    36 $index !=, AD operator$$
     26
    3727
    3828$section AD Binary Comparison Operators$$
     29$mindex compare < <= > >= == !=$$
    3930
    4031
     
    137128CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    138129bool operator < (const AD<Base> &left , const AD<Base> &right)
    139 {       bool result    =  (left.value_ < right.value_);
     130{       bool result    =  (left.value_ < right.value_);
    140131        bool var_left  = Variable(left);
    141132        bool var_right = Variable(right);
     
    188179CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    189180bool operator <= (const AD<Base> &left , const AD<Base> &right)
    190 {       bool result    =  (left.value_ <= right.value_);
     181{       bool result    =  (left.value_ <= right.value_);
    191182        bool var_left  = Variable(left);
    192183        bool var_right = Variable(right);
     
    239230CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    240231bool operator > (const AD<Base> &left , const AD<Base> &right)
    241 {       bool result    =  (left.value_ > right.value_);
     232{       bool result    =  (left.value_ > right.value_);
    242233        bool var_left  = Variable(left);
    243234        bool var_right = Variable(right);
     
    290281CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    291282bool operator >= (const AD<Base> &left , const AD<Base> &right)
    292 {       bool result    =  (left.value_ >= right.value_);
     283{       bool result    =  (left.value_ >= right.value_);
    293284        bool var_left  = Variable(left);
    294285        bool var_right = Variable(right);
     
    341332CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    342333bool operator == (const AD<Base> &left , const AD<Base> &right)
    343 {       bool result    =  (left.value_ == right.value_);
     334{       bool result    =  (left.value_ == right.value_);
    344335        bool var_left  = Variable(left);
    345336        bool var_right = Variable(right);
     
    383374CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    384375bool operator != (const AD<Base> &left , const AD<Base> &right)
    385 {       bool result    =  (left.value_ != right.value_);
     376{       bool result    =  (left.value_ != right.value_);
    386377        bool var_left  = Variable(left);
    387378        bool var_right = Variable(right);
  • trunk/cppad/local/compute_assign.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COMPUTE_ASSIGN_INCLUDED
    3 # define CPPAD_COMPUTE_ASSIGN_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COMPUTE_ASSIGN_HPP
     3# define CPPAD_COMPUTE_ASSIGN_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2424
    2525$section AD Computed Assignment Operators$$
     26$mindex + add plus - subtract minus * multiply times / divide multiple$$
    2627
    27 $index assignment, operator$$
    28 $index operator, assignment$$
    2928
    30 $index +, computed assignment$$
    31 $index add, computed assignment$$
    32 $index plus, computed assignment$$
    3329
    34 $index -, computed assignment$$
    35 $index subtract, computed assignment$$
    36 $index minus, computed assignment$$
    3730
    38 $index *, computed assignment$$
    39 $index multiply, computed assignment$$
    40 $index times, computed assignment$$
    4131
    42 $index /, computed assignment$$
    43 $index divide, computed assignment$$
    4432
    4533$head Syntax$$
     
    4735
    4836$head Purpose$$
    49 Performs computed assignment operations 
    50 where either $icode x$$ has type 
     37Performs computed assignment operations
     38where either $icode x$$ has type
    5139$codei%AD<%Base%>%$$.
    5240
     
    5846$code -=$$   $cnext $icode x$$ is assigned $icode x$$ minus $icode y$$ $rnext
    5947$code *=$$   $cnext $icode x$$ is assigned $icode x$$ times $icode y$$ $rnext
    60 $code /=$$   $cnext $icode x$$ is assigned $icode x$$ divided by $icode y$$ 
     48$code /=$$   $cnext $icode x$$ is assigned $icode x$$ divided by $icode y$$
    6149$tend
    6250
     
    8270
    8371$head Result$$
    84 $index assignment, multiple$$
    85 $index multiple, assignment$$
    86 The result of this assignment
     72The result of this assignment
    8773can be used as a reference to $icode x$$.
    8874For example, if $icode z$$ has the following type
     
    9581%$$
    9682will compute $icode x$$ plus $icode y$$
    97 and then assign this value to both $icode x$$ and $icode z$$. 
     83and then assign this value to both $icode x$$ and $icode z$$.
    9884
    9985
     
    10288$cref/AD of Base/glossary/AD of Base/$$ operation
    10389and hence it is part of the current
    104 AD of $icode Base$$ 
     90AD of $icode Base$$
    10591$cref/operation sequence/glossary/Operation/Sequence/$$.
    10692
     
    123109
    124110$head Derivative$$
    125 If $latex f$$ and $latex g$$ are 
     111If $latex f$$ and $latex g$$ are
    126112$cref/Base functions/glossary/Base Function/$$
    127113
     
    143129$subhead Division$$
    144130$latex \[
    145         \D{[ f(x) / g(x) ]}{x} = 
     131        \D{[ f(x) / g(x) ]}{x} =
    146132                [1/g(x)] * \D{f(x)}{x} - [f(x)/g(x)^2] * \D{g(x)}{x}
    147133\] $$
    148134
    149 $end 
     135$end
    150136-----------------------------------------------------------------------------
    151137*/
  • trunk/cppad/local/cond_exp.hpp

    r3724 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COND_EXP_INCLUDED
    3 # define CPPAD_COND_EXP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COND_EXP_HPP
     3# define CPPAD_COND_EXP_HPP
    44
    55/* --------------------------------------------------------------------------
     
    3636$$
    3737
    38 $index conditional, expression$$
    39 $index expression, conditional$$
    40 $index assign, conditional$$
    4138
    4239$section AD Conditional Expressions$$
     40$mindex assign$$
    4341
    4442$head Syntax$$
  • trunk/cppad/local/cond_op.hpp

    r3709 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COND_OP_INCLUDED
    3 # define CPPAD_COND_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COND_OP_HPP
     3# define CPPAD_COND_OP_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/local/convert.hpp

    r2691 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CONVERT_INCLUDED
    3 # define CPPAD_CONVERT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CONVERT_HPP
     3# define CPPAD_CONVERT_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1919$$
    2020
    21 $index convert, from AD$$
    22 $index AD, convert from$$
    2321
    2422$section Conversion and I/O of AD Objects$$
     23$mindex convert from$$
    2524
    2625$children%
     
    3837$rref Var2Par$$
    3938$tend
    40        
     39
    4140
    4241$end
  • trunk/cppad/local/cos_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COS_OP_INCLUDED
    3 # define CPPAD_COS_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COS_OP_HPP
     3# define CPPAD_COS_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/cosh_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_COSH_OP_INCLUDED
    3 # define CPPAD_COSH_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_COSH_OP_HPP
     3# define CPPAD_COSH_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/cppad_assert.hpp

    r3755 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_CPPAD_ASSERT_INCLUDED
    3 # define CPPAD_CPPAD_ASSERT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_CPPAD_ASSERT_HPP
     3# define CPPAD_CPPAD_ASSERT_HPP
    44
    55/* --------------------------------------------------------------------------
     
    2929$$
    3030
    31 $index assert, error macro $$
    32 $index error, assert macro$$
    33 $index macro, error assert$$
    3431
    3532$section CppAD Assertions During Execution$$
     33$mindex assert macro CPPAD_ASSERT_KNOWN CPPAD_ASSERT_UNKNOWN$$
    3634
    3735$head Syntax$$
     
    4745
    4846$head NDEBUG$$
    49 $index NDEBUG$$
    5047If the preprocessor symbol
    5148$cref/NDEBUG/Faq/Speed/NDEBUG/$$ is defined,
     
    5855
    5956$head Known$$
    60 $index CPPAD_ASSERT_KNOWN$$
    6157The $code CPPAD_ASSERT_KNOWN$$ macro is used to check for an error
    6258with a known cause.
     
    6561
    6662$head Unknown$$
    67 $index CPPAD_ASSERT_UNKNOWN$$
    6863The $code CPPAD_ASSERT_UNKNOWN$$ macro is used to check that the
    6964CppAD internal data structures conform as expected.
     
    9994# include <cassert>
    10095# include <iostream>
    101 # include <cppad/error_handler.hpp>
     96# include <cppad/utility/error_handler.hpp>
    10297
    10398/*!
  • trunk/cppad/local/cppad_colpack.hpp

    r3240 r3757  
    1 /* $Id$ */
     1// $Id$
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
    6 the terms of the 
     6the terms of the
    77                    Eclipse Public License Version 1.0.
    88
     
    1010Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1111-------------------------------------------------------------------------- */
    12 # ifndef CPPAD_CPPAD_COLPACK_INCLUDED
    13 # define CPPAD_CPPAD_COLPACK_INCLUDED
     12# ifndef CPPAD_CPPAD_COLPACK_HPP
     13# define CPPAD_CPPAD_COLPACK_HPP
    1414# if CPPAD_HAS_COLPACK
    1515
     
    2323Link from CppAD to ColPack used for general sparse matrices.
    2424
    25 This CppAD library routine is necessary because 
     25This CppAD library routine is necessary because
    2626<code>ColPack/ColPackHeaders.h</code> has a
    2727<code>using namespace std</code> at the global level.
     
    3737<code>adolc_pattern[i][0]</code> is the number of non-zeros in row \c i.
    3838For <code>j = 1 , ... , adolc_sparsity[i]<code>,
    39 <code>adolc_pattern[i][j]</code> is the column index (base zero) for the 
     39<code>adolc_pattern[i][j]</code> is the column index (base zero) for the
    4040non-zeros in row \c i.
    4141
     
    4646\n
    4747\n
    48 If for some \c i, <code>color[i] == m</code>, then 
     48If for some \c i, <code>color[i] == m</code>, then
    4949<code>adolc_pattern[i][0] == 0</code>.
    5050Otherwise, <code>color[i] < m</code>.
     
    7171(not yet used or tested).
    7272
    73 This CppAD library routine is necessary because 
     73This CppAD library routine is necessary because
    7474<code>ColPack/ColPackHeaders.h</code> has a
    7575<code>using namespace std</code> at the global level.
     
    8282<code>adolc_pattern[i][0]</code> is the number of non-zeros in row \c i.
    8383For <code>j = 1 , ... , adolc_sparsity[i]<code>,
    84 <code>adolc_pattern[i][j]</code> is the column index (base zero) for the 
     84<code>adolc_pattern[i][j]</code> is the column index (base zero) for the
    8585non-zeros in row \c i.
    8686
  • trunk/cppad/local/cskip_op.hpp

    r3689 r3757  
    11// $Id$
    2 # ifndef CPPAD_CSKIP_OP_INCLUDED
    3 # define CPPAD_CSKIP_OP_INCLUDED
     2# ifndef CPPAD_CSKIP_OP_HPP
     3# define CPPAD_CSKIP_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/csum_op.hpp

    r3301 r3757  
    11// $Id$
    2 # ifndef CPPAD_CSUM_OP_INCLUDED
    3 # define CPPAD_CSUM_OP_INCLUDED
     2# ifndef CPPAD_CSUM_OP_HPP
     3# define CPPAD_CSUM_OP_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2323Compute forward mode Taylor coefficients for result of op = CsumOp.
    2424
    25 This operation is 
     25This operation is
    2626\verbatim
    2727        z = s + x(1) + ... + x(m) - y(1) - ... - y(n).
     
    4444
    4545\param arg
    46 \a arg[0] 
     46\a arg[0]
    4747is the number of addition variables in this cummulative summation; i.e.,
    4848<tt>m</tt>.
    4949\n
    50 \a arg[1] 
     50\a arg[1]
    5151is the number of subtraction variables in this cummulative summation; i.e.,
    5252\c m.
     
    5656\n
    5757<tt>arg[2+i]</tt>
    58 for <tt>i = 1 , ... , m</tt> is the variable index of <tt>x(i)</tt>. 
     58for <tt>i = 1 , ... , m</tt> is the variable index of <tt>x(i)</tt>.
    5959\n
    6060<tt>arg[2+arg[0]+i]</tt>
    61 for <tt>i = 1 , ... , n</tt> is the variable index of <tt>y(i)</tt>. 
     61for <tt>i = 1 , ... , n</tt> is the variable index of <tt>y(i)</tt>.
    6262
    6363\param num_par
     
    7272\param taylor
    7373\b Input: <tt>taylor [ arg[2+i] * cap_order + k ]</tt>
    74 for <tt>i = 1 , ... , m</tt> 
     74for <tt>i = 1 , ... , m</tt>
    7575and <tt>k = 0 , ... , q</tt>
    7676is the k-th order Taylor coefficient corresponding to <tt>x(i)</tt>
    7777\n
    7878\b Input: <tt>taylor [ arg[2+m+i] * cap_order + k ]</tt>
    79 for <tt>i = 1 , ... , n</tt> 
     79for <tt>i = 1 , ... , n</tt>
    8080and <tt>k = 0 , ... , q</tt>
    8181is the k-th order Taylor coefficient corresponding to <tt>y(i)</tt>
     
    9191template <class Base>
    9292inline void forward_csum_op(
    93         size_t        p           , 
    94         size_t        q           , 
     93        size_t        p           ,
     94        size_t        q           ,
    9595        size_t        i_z         ,
    9696        const addr_t* arg         ,
     
    107107        CPPAD_ASSERT_UNKNOWN( p <= q );
    108108        CPPAD_ASSERT_UNKNOWN( size_t(arg[2]) < num_par );
    109         CPPAD_ASSERT_UNKNOWN( 
     109        CPPAD_ASSERT_UNKNOWN(
    110110                arg[0] + arg[1] == arg[ arg[0] + arg[1] + 3 ]
    111         ); 
     111        );
    112112
    113113        // Taylor coefficients corresponding to result
     
    125125                for(k = p; k <= q; k++)
    126126                        z[k] += x[k];
    127         }       
     127        }
    128128        i = arg[1];
    129129        while(i--)
     
    132132                for(k = p; k <= q; k++)
    133133                        z[k] -= x[k];
    134         }       
     134        }
    135135}
    136136
     
    138138Multiple direction forward mode Taylor coefficients for op = CsumOp.
    139139
    140 This operation is 
     140This operation is
    141141\verbatim
    142142        z = s + x(1) + ... + x(m) - y(1) - ... - y(n).
     
    159159
    160160\param arg
    161 \a arg[0] 
     161\a arg[0]
    162162is the number of addition variables in this cummulative summation; i.e.,
    163163<tt>m</tt>.
    164164\n
    165 \a arg[1] 
     165\a arg[1]
    166166is the number of subtraction variables in this cummulative summation; i.e.,
    167167\c m.
     
    171171\n
    172172<tt>arg[2+i]</tt>
    173 for <tt>i = 1 , ... , m</tt> is the variable index of <tt>x(i)</tt>. 
     173for <tt>i = 1 , ... , m</tt> is the variable index of <tt>x(i)</tt>.
    174174\n
    175175<tt>arg[2+arg[0]+i]</tt>
    176 for <tt>i = 1 , ... , n</tt> is the variable index of <tt>y(i)</tt>. 
     176for <tt>i = 1 , ... , n</tt> is the variable index of <tt>y(i)</tt>.
    177177
    178178\param num_par
     
    187187\param taylor
    188188\b Input: <tt>taylor [ arg[2+i]*((cap_order-1)*r + 1) + 0 ]</tt>
    189 for <tt>i = 1 , ... , m</tt> 
     189for <tt>i = 1 , ... , m</tt>
    190190is the 0-th order Taylor coefficient corresponding to <tt>x(i)</tt> and
    191191<tt>taylor [ arg[2+i]*((cap_order-1)*r + 1) + (q-1)*r + ell + 1 ]</tt>
    192192for <tt>i = 1 , ... , m</tt>,
    193 <tt>ell = 0 , ... , r-1</tt> 
     193<tt>ell = 0 , ... , r-1</tt>
    194194is the q-th order Taylor coefficient corresponding to <tt>x(i)</tt>
    195195and direction ell.
    196196\n
    197197\b Input: <tt>taylor [ arg[2+m+i]*((cap_order-1)*r + 1) + 0 ]</tt>
    198 for <tt>i = 1 , ... , n</tt> 
     198for <tt>i = 1 , ... , n</tt>
    199199is the 0-th order Taylor coefficient corresponding to <tt>y(i)</tt> and
    200200<tt>taylor [ arg[2+m+i]*((cap_order-1)*r + 1) + (q-1)*r + ell + 1 ]</tt>
    201201for <tt>i = 1 , ... , n</tt>,
    202 <tt>ell = 0 , ... , r-1</tt> 
     202<tt>ell = 0 , ... , r-1</tt>
    203203is the q-th order Taylor coefficient corresponding to <tt>y(i)</tt>
    204204and direction ell.
     
    210210template <class Base>
    211211inline void forward_csum_op_dir(
    212         size_t        q           , 
    213         size_t        r           , 
     212        size_t        q           ,
     213        size_t        r           ,
    214214        size_t        i_z         ,
    215215        const addr_t* arg         ,
     
    226226        CPPAD_ASSERT_UNKNOWN( 0 < q );
    227227        CPPAD_ASSERT_UNKNOWN( size_t(arg[2]) < num_par );
    228         CPPAD_ASSERT_UNKNOWN( 
     228        CPPAD_ASSERT_UNKNOWN(
    229229                arg[0] + arg[1] == arg[ arg[0] + arg[1] + 3 ]
    230         ); 
     230        );
    231231
    232232        // Taylor coefficients corresponding to result
     
    244244                for(ell = 0; ell < r; ell++)
    245245                        z[ell] += x[ell];
    246         }       
     246        }
    247247        i = arg[1];
    248248        while(i--)
     
    251251                for(ell = 0; ell < r; ell++)
    252252                        z[ell] -= x[ell];
    253         }       
     253        }
    254254}
    255255
     
    257257Compute reverse mode Taylor coefficients for result of op = CsumOp.
    258258
    259 This operation is 
     259This operation is
    260260\verbatim
    261261        z = q + x(1) + ... + x(m) - y(1) - ... - y(n).
    262         H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ] 
     262        H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ]
    263263\endverbatim
    264264
     
    277277
    278278\param arg
    279 \a arg[0] 
     279\a arg[0]
    280280is the number of addition variables in this cummulative summation; i.e.,
    281281<tt>m</tt>.
    282282\n
    283 \a arg[1] 
     283\a arg[1]
    284284is the number of subtraction variables in this cummulative summation; i.e.,
    285285\c m.
     
    289289\n
    290290<tt>arg[2+i]</tt>
    291 for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>. 
     291for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>.
    292292\n
    293293<tt>arg[2+arg[0]+i]</tt>
    294 for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>. 
     294for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>.
    295295
    296296\param nc_partial
     
    299299\param partial
    300300\b Input: <tt>partial [ arg[2+i] * nc_partial + k ]</tt>
    301 for <tt>i = 1 , ... , m</tt> 
     301for <tt>i = 1 , ... , m</tt>
    302302and <tt>k = 0 , ... , d</tt>
    303303is the partial derivative of G(z, y, x, w, ...) with respect to the
     
    305305\n
    306306\b Input: <tt>partial [ arg[2+m+i] * nc_partial + k ]</tt>
    307 for <tt>i = 1 , ... , n</tt> 
     307for <tt>i = 1 , ... , n</tt>
    308308and <tt>k = 0 , ... , d</tt>
    309309is the partial derivative of G(z, y, x, w, ...) with respect to the
     
    311311\n
    312312\b Input: <tt>partial [ i_z * nc_partial + k ]</tt>
    313 for <tt>i = 1 , ... , n</tt> 
     313for <tt>i = 1 , ... , n</tt>
    314314and <tt>k = 0 , ... , d</tt>
    315315is the partial derivative of G(z, y, x, w, ...) with respect to the
     
    317317\n
    318318\b Output: <tt>partial [ arg[2+i] * nc_partial + k ]</tt>
    319 for <tt>i = 1 , ... , m</tt> 
     319for <tt>i = 1 , ... , m</tt>
    320320and <tt>k = 0 , ... , d</tt>
    321321is the partial derivative of H(y, x, w, ...) with respect to the
     
    323323\n
    324324\b Output: <tt>partial [ arg[2+m+i] * nc_partial + k ]</tt>
    325 for <tt>i = 1 , ... , n</tt> 
     325for <tt>i = 1 , ... , n</tt>
    326326and <tt>k = 0 , ... , d</tt>
    327327is the partial derivative of H(y, x, w, ...) with respect to the
     
    331331template <class Base>
    332332inline void reverse_csum_op(
    333         size_t        d           , 
     333        size_t        d           ,
    334334        size_t        i_z         ,
    335335        const addr_t* arg         ,
     
    354354                while(k--)
    355355                        px[k] += pz[k];
    356         }       
     356        }
    357357        i = arg[1];
    358358        while(i--)
     
    362362                while(k--)
    363363                        px[k] -= pz[k];
    364         }       
     364        }
    365365}
    366366
    367367
    368368/*!
    369 Forward mode Jacobian sparsity pattern for CSumOp operator. 
    370 
    371 This operation is 
     369Forward mode Jacobian sparsity pattern for CSumOp operator.
     370
     371This operation is
    372372\verbatim
    373373        z = q + x(1) + ... + x(m) - y(1) - ... - y(n).
     
    383383
    384384\param arg
    385 \a arg[0] 
     385\a arg[0]
    386386is the number of addition variables in this cummulative summation; i.e.,
    387387<tt>m + n</tt>.
    388388\n
    389 \a arg[1] 
     389\a arg[1]
    390390is the number of subtraction variables in this cummulative summation; i.e.,
    391391\c m.
     
    395395\n
    396396<tt>arg[2+i]</tt>
    397 for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>. 
     397for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>.
    398398\n
    399399<tt>arg[2+arg[1]+i]</tt>
    400 for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>. 
     400for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>.
    401401
    402402\param sparsity
    403 \b Input: 
     403\b Input:
    404404For <tt>i = 1 , ... , m</tt>,
    405405the set with index \a arg[2+i] in \a sparsity
    406406is the sparsity bit pattern for <tt>x(i)</tt>.
    407 This identifies which of the independent variables the variable 
    408 <tt>x(i)</tt> depends on. 
    409 \n
    410 \b Input: 
     407This identifies which of the independent variables the variable
     408<tt>x(i)</tt> depends on.
     409\n
     410\b Input:
    411411For <tt>i = 1 , ... , n</tt>,
    412412the set with index \a arg[2+arg[0]+i] in \a sparsity
    413413is the sparsity bit pattern for <tt>x(i)</tt>.
    414 This identifies which of the independent variables the variable 
    415 <tt>y(i)</tt> depends on. 
    416 \n
    417 \b Output: 
     414This identifies which of the independent variables the variable
     415<tt>y(i)</tt> depends on.
     416\n
     417\b Output:
    418418The set with index \a i_z in \a sparsity
    419419is the sparsity bit pattern for z.
    420420This identifies which of the independent variables the variable z
    421 depends on. 
     421depends on.
    422422*/
    423423
     
    437437                        i_z        , // index in sparsity for result
    438438                        i_z        , // index in sparsity for left operand
    439                         arg[++j]   , // index for right operand 
     439                        arg[++j]   , // index for right operand
    440440                        sparsity     // sparsity vector for right operand
    441441                );
    442         }       
     442        }
    443443}
    444444
    445445/*!
    446 Reverse mode Jacobian sparsity pattern for CSumOp operator. 
    447 
    448 This operation is 
     446Reverse mode Jacobian sparsity pattern for CSumOp operator.
     447
     448This operation is
    449449\verbatim
    450450        z = q + x(1) + ... + x(m) - y(1) - ... - y(n).
    451         H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ] 
     451        H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ]
    452452\endverbatim
    453453
     
    461461
    462462\param arg
    463 \a arg[0] 
     463\a arg[0]
    464464is the number of addition variables in this cummulative summation; i.e.,
    465465<tt>m + n</tt>.
    466466\n
    467 \a arg[1] 
     467\a arg[1]
    468468is the number of subtraction variables in this cummulative summation; i.e.,
    469469\c m.
     
    473473\n
    474474<tt>arg[2+i]</tt>
    475 for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>. 
     475for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>.
    476476\n
    477477<tt>arg[2+arg[1]+i]</tt>
    478 for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>. 
     478for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>.
    479479
    480480\param sparsity
     
    482482the set with index \a arg[2+i] in \a sparsity
    483483is the sparsity bit pattern for <tt>x(i)</tt>.
    484 This identifies which of the dependent variables depend on <tt>x(i)</tt>. 
     484This identifies which of the dependent variables depend on <tt>x(i)</tt>.
    485485On input, the sparsity patter corresponds to \c G,
    486486and on ouput it corresponds to \c H.
     
    489489the set with index \a arg[2+arg[0]+i] in \a sparsity
    490490is the sparsity bit pattern for <tt>y(i)</tt>.
    491 This identifies which of the dependent variables depend on <tt>y(i)</tt>. 
     491This identifies which of the dependent variables depend on <tt>y(i)</tt>.
    492492On input, the sparsity patter corresponds to \c G,
    493493and on ouput it corresponds to \c H.
    494494\n
    495 \b Input: 
     495\b Input:
    496496The set with index \a i_z in \a sparsity
    497497is the sparsity bit pattern for z.
     
    514514                        arg[j]     , // index in sparsity for result
    515515                        arg[j]     , // index in sparsity for left operand
    516                         i_z        , // index for right operand 
     516                        i_z        , // index for right operand
    517517                        sparsity     // sparsity vector for right operand
    518518                );
    519         }       
     519        }
    520520}
    521521/*!
    522 Reverse mode Hessian sparsity pattern for CSumOp operator. 
    523 
    524 This operation is 
     522Reverse mode Hessian sparsity pattern for CSumOp operator.
     523
     524This operation is
    525525\verbatim
    526526        z = q + x(1) + ... + x(m) - y(1) - ... - y(n).
    527         H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ] 
     527        H(y, x, w, ...) = G[ z(x, y), y, x, w, ... ]
    528528\endverbatim
    529529
     
    537537
    538538\param arg
    539 \a arg[0] 
     539\a arg[0]
    540540is the number of addition variables in this cummulative summation; i.e.,
    541541<tt>m + n</tt>.
    542542\n
    543 \a arg[1] 
     543\a arg[1]
    544544is the number of subtraction variables in this cummulative summation; i.e.,
    545545\c m.
     
    549549\n
    550550<tt>arg[2+i]</tt>
    551 for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>. 
     551for <tt>i = 1 , ... , m</tt> is the value <tt>x(i)</tt>.
    552552\n
    553553<tt>arg[2+arg[0]+i]</tt>
    554 for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>. 
     554for <tt>i = 1 , ... , n</tt> is the value <tt>y(i)</tt>.
    555555
    556556\param rev_jacobian
     
    560560\n
    561561\n
    562 For <tt>i = 1 , ... , m</tt> 
     562For <tt>i = 1 , ... , m</tt>
    563563<tt>rev_jacobian[ arg[2+i] ]</tt>
    564564is all false (true) if the Jacobian with respect to <tt>x(i)</tt>
     
    568568\n
    569569\n
    570 For <tt>i = 1 , ... , n</tt> 
     570For <tt>i = 1 , ... , n</tt>
    571571<tt>rev_jacobian[ arg[2+arg[0]+i] ]</tt>
    572572is all false (true) if the Jacobian with respect to <tt>y(i)</tt>
     
    581581\n
    582582\n
    583 For <tt>i = 1 , ... , m</tt> 
     583For <tt>i = 1 , ... , m</tt>
    584584The set with index <tt>arg[2+i]</tt> in \a rev_hes_sparsity
    585 is the Hessian sparsity pattern 
     585is the Hessian sparsity pattern
    586586where one of the partials derivative is with respect to <tt>x(i)</tt>.
    587587On input, it corresponds to the function G,
     
    589589\n
    590590\n
    591 For <tt>i = 1 , ... , n</tt> 
     591For <tt>i = 1 , ... , n</tt>
    592592The set with index <tt>arg[2+arg[0]+i]</tt> in \a rev_hes_sparsity
    593 is the Hessian sparsity pattern 
     593is the Hessian sparsity pattern
    594594where one of the partials derivative is with respect to <tt>y(i)</tt>.
    595595On input, it corresponds to the function G,
     
    613613                arg[j]             , // index in sparsity for result
    614614                arg[j]             , // index in sparsity for left operand
    615                 i_z                , // index for right operand 
     615                i_z                , // index for right operand
    616616                rev_hes_sparsity     // sparsity vector for right operand
    617617                );
    618618                rev_jacobian[arg[j]] |= rev_jacobian[i_z];
    619         }       
     619        }
    620620}
    621621
  • trunk/cppad/local/declare_ad.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DECLARE_AD_INCLUDED
    3 # define CPPAD_DECLARE_AD_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DECLARE_AD_HPP
     3# define CPPAD_DECLARE_AD_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/define.hpp

    r3755 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DEFINE_INCLUDED
    3 # define CPPAD_DEFINE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DEFINE_HPP
     3# define CPPAD_DEFINE_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/dependent.hpp

    r3607 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DEPENDENT_INCLUDED
    3 # define CPPAD_DEPENDENT_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DEPENDENT_HPP
     3# define CPPAD_DEPENDENT_HPP
    44
    55/* --------------------------------------------------------------------------
     
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1515/*
    1616$begin Dependent$$
    17 $spell 
     17$spell
    1818        alloc
    1919        num
     
    2727
    2828$section Stop Recording and Store Operation Sequence$$
    29 
    30 $index ADFun, operation sequence$$
    31 $index operation, sequence store$$
    32 $index sequence, operation store$$
    33 $index recording, stop$$
    34 $index tape, stop recording$$
    35 $index Dependent$$
     29$mindex ADFun tape Dependent$$
     30
    3631
    3732$head Syntax$$
     
    4641%$$
    4742and store the operation sequence in $icode f$$.
    48 The operation sequence defines an 
     43The operation sequence defines an
    4944$cref/AD function/glossary/AD Function/$$
    5045$latex \[
     
    5247\] $$
    5348where $latex B$$ is the space corresponding to objects of type $icode Base$$.
    54 The value $latex n$$ is the dimension of the 
     49The value $latex n$$ is the dimension of the
    5550$cref/domain/seq_property/Domain/$$ space for the operation sequence.
    56 The value $latex m$$ is the dimension of the 
     51The value $latex m$$ is the dimension of the
    5752$cref/range/seq_property/Range/$$ space for the operation sequence
    5853(which is determined by the size of $icode y$$).
     
    6661it becomes the operation sequence corresponding to $icode f$$.
    6762If a previous operation sequence was stored in $icode f$$,
    68 it is deleted. 
     63it is deleted.
    6964
    7065$head x$$
    71 The argument $icode x$$ 
     66The argument $icode x$$
    7267must be the vector argument in a previous call to
    7368$cref Independent$$.
     
    7772        Independent(%x%)
    7873%$$
    79 and 
     74and
    8075$codei%
    8176        %f%.Dependent(%x%, %y%)
     
    10095$head Taping$$
    10196The tape,
    102 that was created when $codei%Independent(%x%)%$$ was called, 
     97that was created when $codei%Independent(%x%)%$$ was called,
    10398will stop recording.
    10499The AD operation sequence will be transferred from
     
    110105$codei%
    111106        %f%.size_order()
    112 %$$ 
     107%$$
    113108is zero (see $cref size_order$$).
    114109
    115110$head Parallel Mode$$
    116 $index parallel, Dependent$$
    117 $index Dependent, parallel$$
    118111The call to $code Independent$$,
    119112and the corresponding call to
     
    121114        ADFun<%Base%> %f%( %x%, %y%)
    122115%$$
    123 or 
     116or
    124117$codei%
    125118        %f%.Dependent( %x%, %y%)
     
    131124$head Example$$
    132125The file
    133 $cref fun_check.cpp$$ 
     126$cref fun_check.cpp$$
    134127contains an example and test of this operation.
    135128It returns true if it succeeds and false otherwise.
     
    236229
    237230\par
    238 All of the private member data in ad_fun.hpp is set to correspond to the 
     231All of the private member data in ad_fun.hpp is set to correspond to the
    239232new tape except for check_for_nan_.
    240233*/
     
    255248                y.size() > 0,
    256249                "ADFun operation sequence dependent variable size is zero size"
    257         ); 
     250        );
    258251        // ---------------------------------------------------------------------
    259252        // Begin setting ad_fun.hpp private member data
     
    266259        {       dep_parameter_[i] = CppAD::Parameter(y[i]);
    267260                if( dep_parameter_[i] )
    268                 {       // make a tape copy of dependent variables that are parameters, 
     261                {       // make a tape copy of dependent variables that are parameters,
    269262                        y_taddr = tape->RecordParOp( y[i].value_ );
    270263                }
     
    304297        // play_
    305298        // Now that each dependent variable has a place in the tape,
    306         // and there is a EndOp at the end of the tape, we can transfer the 
     299        // and there is a EndOp at the end of the tape, we can transfer the
    307300        // recording to the player and and erase the tape.
    308301        play_.get(tape->Rec_);
     
    327320        AD<Base>::tape_manage(tape_manage_delete);
    328321
    329         // total number of varables in this recording 
     322        // total number of varables in this recording
    330323        CPPAD_ASSERT_UNKNOWN( num_var_tape_  == play_.num_var_rec() );
    331324
  • trunk/cppad/local/discrete.hpp

    r3607 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DISCRETE_INCLUDED
    3 # define CPPAD_DISCRETE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DISCRETE_HPP
     3# define CPPAD_DISCRETE_HPP
    44
    55/* --------------------------------------------------------------------------
     
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2828
    2929$section Discrete AD Functions$$
    30 
    31 $index discrete, AD function$$
    32 $index function, discrete AD$$
     30$mindex CPPAD_DISCRETE_FUNCTION$$
     31
    3332
    3433$head Syntax$$
     
    4847$cref/independent variables/glossary/Tape/Independent Variable/$$,
    4948but its derivative is identically zero.
    50 For example, suppose that the integer part of 
    51 a $cref/variable/glossary/Variable/$$ $icode x$$ is the 
    52 index into an array of values. 
     49For example, suppose that the integer part of
     50a $cref/variable/glossary/Variable/$$ $icode x$$ is the
     51index into an array of values.
    5352
    5453$head Base$$
    55 This is the 
     54This is the
    5655$cref/base type/base_require/$$
    5756corresponding to the operations sequence;
     
    9897
    9998$head Create AD Version$$
    100 $index CPPAD_DISCRETE_FUNCTION$$
    10199The preprocessor macro invocation
    102100$codei%
    103101        CPPAD_DISCRETE_FUNCTION(%Base%, %name%)
    104 %$$ 
     102%$$
    105103defines the $codei%AD<%Base%>%$$ version of $icode name$$.
    106 This can be with in a namespace (not the $code CppAD$$ namespace) 
     104This can be with in a namespace (not the $code CppAD$$ namespace)
    107105but must be outside of any routine.
    108106
     
    121119
    122120$head Parallel Mode$$
    123 $index discrete, parallel$$
    124 $index parallel, discrete$$
    125 The first call to
     121The first call to
    126122$codei%
    127123        %ay% = %name%(%ax%)
    128124%$$
    129125must not be in $cref/parallel/ta_in_parallel/$$ execution mode.
    130        
     126
    131127
    132128$head Example$$
     
    138134The file
    139135$cref tape_index.cpp$$
    140 contains an example and test that uses a discrete function 
     136contains an example and test that uses a discrete function
    141137to vary an array index during $cref Forward$$ mode calculations.
    142138The file
     
    149145
    150146$head CppADCreateDiscrete Deprecated 2007-07-28$$
    151 $index CppADCreateDiscrete, deprecated$$
    152 $index deprecated, CppADCreateDiscrete$$
    153147The preprocessor symbol $code CppADCreateDiscrete$$
    154148is defined to be the same as $code CPPAD_DISCRETE_FUNCTION$$
     
    162156
    163157// needed before one can use CPPAD_ASSERT_FIRST_CALL_NOT_PARALLEL
    164 # include <cppad/thread_alloc.hpp>
     158# include <cppad/utility/thread_alloc.hpp>
    165159
    166160namespace CppAD { // BEGIN_CPPAD_NAMESPACE
     
    172166/*!
    173167\def CPPAD_DISCRETE_FUNCTION(Base, name)
    174 Defines the function <code>name(ax, ay)</code> 
     168Defines the function <code>name(ax, ay)</code>
    175169where \c ax and \c ay are vectors with <code>AD<Base></code> elements.
    176170
     
    178172is the base type for the discrete function.
    179173
    180 \par name 
     174\par name
    181175is the name of the user defined function that corresponding to this operation.
    182176*/
     
    188182                                                        \
    189183     return fun.ad(ax);                                 \
    190 }                                     
     184}
    191185# define CppADCreateDiscrete CPPAD_DISCRETE_FUNCTION
    192186
     
    217211        List of all objects in this class.
    218212
    219         If we use CppAD::vector for this vector, it will appear that 
     213        If we use CppAD::vector for this vector, it will appear that
    220214        there is a memory leak because this list is not distroyed before
    221215        thread_alloc::free_available(thread) is called by the testing routines.
     
    243237        the static object \c List.
    244238        */
    245         discrete(const char* Name, F f) : 
     239        discrete(const char* Name, F f) :
    246240        name_(Name)
    247         , f_(f) 
     241        , f_(f)
    248242        , index_( List().size() )
    249         {       
     243        {
    250244                CPPAD_ASSERT_KNOWN(
    251245                        ! thread_alloc::in_parallel() ,
     
    256250
    257251        /*!
    258         Implement the user call to <code>ay = name(ax)</code>.
     252        Implement the user call to <code>ay = name(ax)</code>.
    259253
    260254        \param ax
     
    281275
    282276                        CPPAD_ASSERT_UNKNOWN( Variable(ay) );
    283                 } 
     277                }
    284278                return ay;
    285279        }
     
    290284
    291285        /*!
    292         Link from forward mode sweep to users routine
     286        Link from forward mode sweep to users routine
    293287
    294288        \param index
    295         index for this function in the list of all discrete object 
     289        index for this function in the list of all discrete object
    296290
    297291        \param x
  • trunk/cppad/local/discrete_op.hpp

    r3321 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DISCRETE_OP_INCLUDED
    3 # define CPPAD_DISCRETE_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DISCRETE_OP_HPP
     3# define CPPAD_DISCRETE_OP_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    3434\tparam Base
    3535base type for the operator; i.e., this operation was recorded
    36 using AD< \a Base > and computations by this routine are done using type 
     36using AD< \a Base > and computations by this routine are done using type
    3737\a Base .
    3838
     
    4444
    4545\param r
    46 is the number of directions, for each order, 
     46is the number of directions, for each order,
    4747that will be calculated (except for order zero wich only has one direction).
    4848
    4949\param i_z
    50 variable index corresponding to the result for this operation; 
    51 i.e. the row index in \a taylor corresponding to z. 
     50variable index corresponding to the result for this operation;
     51i.e. the row index in \a taylor corresponding to z.
    5252
    5353\param arg
    5454\a arg[0]
    5555\n
    56 is the index, in the order of the discrete functions defined by the user, 
     56is the index, in the order of the discrete functions defined by the user,
    5757for this discrete function.
    5858\n
     
    7676\b Output: if <code>p == 0</code>
    7777<code>taylor [ i_z * tpv + 0 ]</code>
    78 is the zero order Taylor coefficient corresponding to z. 
     78is the zero order Taylor coefficient corresponding to z.
    7979For k = max(p, 1), ... , q,
    8080<code>taylor [ i_z * tpv + (k-1)*r + 1 + ell ]</code>
     
    9595        size_t        i_z         ,
    9696        const addr_t* arg         ,
    97         size_t        cap_order   , 
     97        size_t        cap_order   ,
    9898        Base*         taylor      )
    99 {       
     99{
    100100        // check assumptions
    101101        CPPAD_ASSERT_UNKNOWN( NumArg(DisOp) == 2 );
  • trunk/cppad/local/div.hpp

    r2773 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DIV_INCLUDED
    3 # define CPPAD_DIV_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DIV_HPP
     3# define CPPAD_DIV_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    9999} // END CppAD namespace
    100100
    101 # endif 
     101# endif
  • trunk/cppad/local/div_eq.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DIV_EQ_INCLUDED
    3 # define CPPAD_DIV_EQ_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DIV_EQ_HPP
     3# define CPPAD_DIV_EQ_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    5252                {       // this = variable * 1
    5353                }
    54                 else 
     54                else
    5555                {       // this = variable / parameter
    5656                        CPPAD_ASSERT_UNKNOWN( NumRes(DivvpOp) == 1 );
     
    9191} // END CppAD namespace
    9292
    93 # endif 
     93# endif
  • trunk/cppad/local/div_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DIV_OP_INCLUDED
    3 # define CPPAD_DIV_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DIV_OP_HPP
     3# define CPPAD_DIV_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/drivers.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_DRIVERS_INCLUDED
    3 # define CPPAD_DRIVERS_INCLUDED
     1// $Id$
     2# ifndef CPPAD_DRIVERS_HPP
     3# define CPPAD_DRIVERS_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-08 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1919$$
    2020
    21 $index forward, easy driver$$
    22 $index reverse, easy driver$$
    23 $index easy, driver$$
    24 $index driver, easy$$
    2521
    2622$section First and Second Derivatives: Easy Drivers$$
     23$mindex forward reverse$$
    2724
    2825
     
    4845# include <cppad/local/sparse_jacobian.hpp>
    4946# include <cppad/local/sparse_hessian.hpp>
    50  
     47
    5148# endif
  • trunk/cppad/local/epsilon.hpp

    r3739 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_EPSILON_INCLUDED
    3 # define CPPAD_EPSILON_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EPSILON_HPP
     3# define CPPAD_EPSILON_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/local/equal_op_seq.hpp

    r2506 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_EQUAL_OP_SEQ_INCLUDED
    3 # define CPPAD_EQUAL_OP_SEQ_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EQUAL_OP_SEQ_HPP
     3# define CPPAD_EQUAL_OP_SEQ_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    1616/*
    1717------------------------------------------------------------------------------
    18 $begin EqualOpSeq$$ 
     18$begin EqualOpSeq$$
    1919$spell
    2020        Op
     
    2323$$
    2424
    25 $index EqualOpSeq$$
    26 $index operation, equal sequence$$
    27 $index sequence, equal operation$$
    28 $index equal, operation sequence$$
    2925
    3026$section Check if Two Value are Identically Equal$$
     27$mindex EqualOpSeq operation sequence$$
    3128
    3229$head Syntax$$
     
    4340Sometimes it is useful to cache information
    4441and only recalculate when a function's arguments change.
    45 In the case of AD variables, 
     42In the case of AD variables,
    4643it may be important not only when the argument values are equal,
    4744but when they are related to the
    48 $cref/independent variables/glossary/Tape/Independent Variable/$$ 
     45$cref/independent variables/glossary/Tape/Independent Variable/$$
    4946by the same operation sequence.
    5047After the assignment
     
    7572
    7673$list number$$
    77 Both $icode x$$ and $icode y$$ are variables 
     74Both $icode x$$ and $icode y$$ are variables
    7875and correspond to the same operation sequence.
    7976$lnext
     
    9895
    9996
    100 $end 
     97$end
    10198------------------------------------------------------------------------------
    10299*/
     
    107104        CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    108105        bool EqualOpSeq(const AD<Base> &x, const AD<Base> &y)
    109         {       
     106        {
    110107                if( Parameter(x) )
    111108                {       if( Parameter(y) )
     
    118115                return (x.taddr_ == y.taddr_);
    119116        }
    120                
     117
    121118}
    122119
  • trunk/cppad/local/erf.hpp

    r3686 r3757  
    11// $Id$
    2 # ifndef CPPAD_ERF_INCLUDED
    3 # define CPPAD_ERF_INCLUDED
     2# ifndef CPPAD_ERF_HPP
     3# define CPPAD_ERF_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/erf_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_ERF_OP_INCLUDED
    3 # define CPPAD_ERF_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_ERF_OP_HPP
     3# define CPPAD_ERF_OP_HPP
    44# if CPPAD_USE_CPLUSPLUS_2011
    55
  • trunk/cppad/local/exp_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_EXP_OP_INCLUDED
    3 # define CPPAD_EXP_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EXP_OP_HPP
     3# define CPPAD_EXP_OP_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/expm1.hpp

    r3686 r3757  
    1 // $Id:$
    2 # ifndef CPPAD_EXPM1_INCLUDED
    3 # define CPPAD_EXPM1_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EXPM1_HPP
     3# define CPPAD_EXPM1_HPP
    44
    55/* --------------------------------------------------------------------------
  • trunk/cppad/local/expm1_op.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_EXPM1_OP_INCLUDED
    3 # define CPPAD_EXPM1_OP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_EXPM1_OP_HPP
     3# define CPPAD_EXPM1_OP_HPP
    44# if CPPAD_USE_CPLUSPLUS_2011
    55
  • trunk/cppad/local/for_jac_sweep.hpp

    r3735 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_FOR_JAC_SWEEP_INCLUDED
    3 # define CPPAD_FOR_JAC_SWEEP_INCLUDED
     1// $Id$
     2# ifndef CPPAD_FOR_JAC_SWEEP_HPP
     3# define CPPAD_FOR_JAC_SWEEP_HPP
    44/* --------------------------------------------------------------------------
    55CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
  • trunk/cppad/local/for_one.hpp

    r2683 r3757  
    1 /* $Id$ */
    2 # ifndef CPPAD_FOR_ONE_INCLUDED
    3 # define CPPAD_FOR_ONE_INCLUDED
     1// $Id$
     2# ifndef CPPAD_FOR_ONE_HPP
     3# define CPPAD_FOR_ONE_HPP
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
    9 the terms of the 
     9the terms of the
    1010                    Eclipse Public License Version 1.0.
    1111
     
    2424
    2525
    26 $index partial, first order driver$$
    27 $index first, order partial driver$$
    28 $index driver, first order partial$$
    2926
    30 $index easy, partial$$
    31 $index driver, easy partial$$
    32 $index partial, easy$$
    3327
    3428$section First Order Partial Derivative: Driver Routine$$
     29$mindex easy$$
    3530
    3631$head Syntax$$
     
    4439partial of $latex F$$ with respect to $latex x_j$$; i.e.,
    4540$latex \[
    46 dy 
    47 = \D{F}{ x_j } (x) 
    48 = \left[ 
    49         \D{ F_0 }{ x_j } (x) , \cdots , \D{ F_{m-1} }{ x_j } (x) 
     41dy
     42= \D{F}{ x_j } (x)
     43= \left[
     44        \D{ F_0 }{ x_j } (x) , \cdots , \D{ F_{m-1} }{ x_j } (x)
    5045\right]
    5146\] $$
     
    6560%$$
    6661(see $cref/Vector/ForOne/Vector/$$ below)
    67 and its size 
     62and its size
    6863must be equal to $icode n$$, the dimension of the
    6964$cref/domain/seq_property/Domain/$$ space for $icode f$$.
     
    7873an is less than $icode n$$,
    7974$cref/domain/seq_property/Domain/$$ space for $icode f$$.
    80 It specifies the component of $icode F$$ 
     75It specifies the component of $icode F$$
    8176for which we are computing the partial derivative.
    8277
     
    106101$head ForOne Uses Forward$$
    107102After each call to $cref Forward$$,
    108 the object $icode f$$ contains the corresponding 
     103the object $icode f$$ contains the corresponding
    109104$cref/Taylor coefficients/glossary/Taylor Coefficient/$$.
    110105After a call to $code ForOne$$,
     
    117112        example/for_one.cpp
    118113%$$
    119 The routine 
     114The routine
    120115$cref/ForOne/for_one.cpp/$$ is both an example and test.
    121116It returns $code true$$, if it succeeds and $code false$$ otherwise.
     
    142137                x.size() == n,
    143138                "ForOne: Length of x not equal domain dimension for f"
    144         ); 
     139        );
    145140        CPPAD_ASSERT_KNOWN(
    146141                j < n,
  • trunk/cppad/local/for_sparse_jac.hpp

    r3718