Changeset 1535


Ignore:
Timestamp:
Sep 29, 2009 10:14:41 AM (11 years ago)
Author:
bradbell
Message:

trunk: Add doxygen documentation for sparsity calculations.

check_doxygen.sh: check classes that have been documented, check sparsity doc.
whats_new_09.omh: change that matters to user.
player.hpp: fix doxygen warning in player class documention.
ad_fun.hpp: convert ADFun<Base> comments to doxygen documentation.
vector_pack.hpp: fix doxygen warning in vector_pack class documention.
for_sparse_jac.hpp: add doxygen documentation for this sparsity routine.
rev_sparse_jac.hpp: add doxygen documentation for this sparsity routine.
optimize.hpp: fix doxygen confusion by moving CPPAD_END_NAMESPACE.
rev_sparse_hes.hpp: add doxygen documentation, fix user doc error.
vector_set.hpp: fix doxygen warning in vector_set class documention.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/check_doxygen.sh

    r1529 r1535  
    1212# -----------------------------------------------------------------------------
    1313#
    14 list="
     14# classes that have been completely documented
     15class_list="
     16        player
     17        recorder
     18        vector_pack
     19        vector_set
     20"
     21# files that have been completely documented
     22file_list="
    1523        abs_op.hpp
    1624        add_op.hpp
     
    2836        forward_sweep.hpp
    2937        for_jac_sweep.hpp
     38        for_sparse_jac.hpp
    3039        hash_code.hpp
    3140        load_op.hpp
     
    4251        rev_hes_sweep.hpp
    4352        rev_jac_sweep.hpp
     53        rev_sparse_hes.hpp
     54        rev_sparse_jac.hpp
    4455        sin_op.hpp
    4556        sinh_op.hpp
     
    5263        vector_set.hpp
    5364"
    54 for name in $list
     65# --------------------------------------------------------------------------
     66for class in $class_list
    5567do
    56         if [ ! -e "cppad/local/$name" ] && [ ! -e "cppad/$name" ]
     68        if grep -i "warning:.*$class::" doxygen.log
    5769        then
    58                 echo "check_doxygen.sh: cannot find file $name"
    59                 exit 1
    60         fi
    61         if grep -i "$name.*warning" doxygen.log
    62         then
    63                 echo "Unexpected doxygen error or warning for $name."
     70                echo "Unexpected doxygen error or warning for $file."
    6471                exit 1
    6572        fi
    6673done
     74# --------------------------------------------------------------------------
     75for file in $file_list
     76do
     77        if [ ! -e "cppad/local/$file" ] && [ ! -e "cppad/$file" ]
     78        then
     79                echo "check_doxygen.sh: cannot find file $file"
     80                exit 1
     81        fi
     82        if grep -i "$file.*warning" doxygen.log
     83        then
     84                echo "Unexpected doxygen error or warning for $file."
     85                exit 1
     86        fi
     87done
  • trunk/cppad/local/ad_fun.hpp

    r1534 r1535  
    5858$end
    5959*/
    60 
    61 
    62 // BEGIN CppAD namespace
    63 namespace CppAD {
     60CPPAD_BEGIN_NAMESPACE
     61
     62/*!
     63\file ad_fun.hpp
     64File used to define the ADFun<Base> class.
     65*/
     66
     67/*!
     68Class used to hold function objects
     69
     70\tparam Base
     71This function object case recorded using AD< \a Base > operations.
     72It does it calculations using \a Base operations.
     73*/
    6474
    6575template <class Base>
     
    6979private:
    7080
    71         // debug checking number of comparision operations that changed
     81        /// debug checking number of comparision operations that changed
    7282        size_t compare_change_;
    7383
    74         // number of taylor_ coefficieint per variable (currently stored)
     84        /// number of taylor_ coefficieint per variable (currently stored)
    7585        size_t taylor_per_var_;
    7686
    77         // number of columns currently allocated for taylor_ array
     87        /// number of columns currently allocated for taylor_ array
    7888        size_t taylor_col_dim_;
    7989
    80         // number of rows (variables) in the recording (play_)
     90        /// number of rows (variables) in the recording (play_)
    8191        size_t total_num_var_;
    8292
    83         // tape address for the independent variables
     93        /// tape address for the independent variables
    8494        CppAD::vector<size_t> ind_taddr_;
    8595
    86         // tape address and parameter flag for the dependent variables
     96        /// tape address and parameter flag for the dependent variables
    8797        CppAD::vector<size_t> dep_taddr_;
    8898
    89         // which dependent variables are actually parameters
     99        /// which dependent variables are actually parameters
    90100        CppAD::vector<bool>   dep_parameter_;
    91101
    92         // the operation sequence corresponding to this object
     102        /// the operation sequence corresponding to this object
    93103        player<Base> play_;
    94104
    95         // results of the forward mode calculations
     105        /// results of the forward mode calculations
    96106        Base *taylor_;
    97107
    98         // results of the forward mode Jacobian sparsity calculations
    99         // (n_set() for one of these two will always be zero)
     108        /// packed results of the forward mode Jacobian sparsity calculations
     109        /// (\c for_jac_sparse_pack_.n_set() != 0  implies
     110        /// for_jac_sparse_set_.n_set() == 0)
    100111        vector_pack      for_jac_sparse_pack_;
     112
     113        /// set results of the forward mode Jacobian sparsity calculations
     114        /// (\c for_jac_sparse_set_.n_set() != 0  implies
     115        /// for_jac_sparse_pack_.n_set() == 0)
    101116        vector_set       for_jac_sparse_set_;
    102117
    103         // change the operation sequence corresponding to this object
     118        /// change the operation sequence corresponding to this object
    104119        template <typename ADvector>
    105120        void Dependent(ADTape<Base> *tape, const ADvector &y);
     
    107122// ------------------------------------------------------------
    108123public:
    109         // default constructor
     124        /// default constructor
    110125        ADFun(void)
    111126        : total_num_var_(0), taylor_(CPPAD_NULL)
    112127        { }
    113128
    114         // sequence constructor
     129        /// sequence constructor
    115130        template <typename ADvector>
    116131        ADFun(const ADvector &x, const ADvector &y);
    117132
    118         // destructor
     133        /// destructor
    119134        ~ADFun(void)
    120135        {       if( taylor_ != CPPAD_NULL )
     
    122137        }
    123138
    124         // assign a new operation sequence
     139        /// deprecated: assign a new operation sequence
    125140        template <typename ADvector>
    126         void Dependent(const ADvector &y);  // deprecated
    127 
     141        void Dependent(const ADvector &y);
     142
     143        /// assign a new operation sequence
    128144        template <typename ADvector>
    129145        void Dependent(const ADvector &x, const ADvector &y);
    130146
    131         // forward mode sweep
     147        /// forward mode sweep
    132148        template <typename VectorBase>
    133149        VectorBase Forward(size_t p, const VectorBase &u);
    134150
    135         // reverse mode sweep
     151        /// reverse mode sweep
    136152        template <typename VectorBase>
    137153        VectorBase Reverse(size_t p, const VectorBase &v);
    138154
    139155        // forward mode Jacobian sparsity
     156        // (see doxygen documentation in for_sparse_jac.hpp)
    140157        template <typename VectorBool>
    141158        VectorBool ForSparseJac(
     
    143160        );
    144161        // reverse mode Jacobian sparsity
     162        // (see doxygen documentation in rev_sparse_hes.hpp)
    145163        template <typename VectorBool>
    146164        VectorBool RevSparseJac(
    147165                size_t q, const VectorBool &Py, bool packed = true
    148166        );
    149         // reverse mode Hessian sparsity
     167        /// reverse mode Hessian sparsity
    150168        template <typename VectorBool>
    151169        VectorBool RevSparseHes(size_t q, const VectorBool &Py);
    152170
    153         // does this AD operation sequence use VecAD<Base>::reference operands
     171        /// does this AD operation sequence use VecAD<Base>::reference operands
    154172        bool use_VecAD(void) const
    155173        {       return play_.num_rec_vecad_ind() > 0; }
    156174
    157         // number of variables in opertion sequence
     175        /// number of variables in opertion sequence
    158176        size_t size_var(void) const
    159177        {       return total_num_var_; }
    160178
    161         // number of parameters in the operation sequence
     179        /// number of parameters in the operation sequence
    162180        size_t size_par(void) const
    163181        {       return play_.num_rec_par(); }
    164182
    165         // number of VecAD indices in the operation sequence
     183        /// number of VecAD indices in the operation sequence
    166184        size_t size_VecAD(void) const
    167185        {       return play_.num_rec_vecad_ind(); }
    168186
    169         // number of taylor_ coefficients currently calculated (per variable)
     187        /// number of taylor_ coefficients currently calculated (per variable)
    170188        size_t size_taylor(void) const
    171189        {       return taylor_per_var_; }
    172190
    173         // set number of coefficients currently allocated (per variable)
     191        /// set number of coefficients currently allocated (per variable)
    174192        void capacity_taylor(size_t per_var);   
    175193
    176         // number of independent variables
     194        /// number of independent variables
    177195        size_t Domain(void) const
    178196        {       return ind_taddr_.size(); }
    179197
    180         // number of dependent variables
     198        /// number of dependent variables
    181199        size_t Range(void) const
    182200        {       return dep_taddr_.size(); }
    183201
    184         // is variable a parameter
     202        /// is variable a parameter
    185203        bool Parameter(size_t i)
    186204        {       CPPAD_ASSERT_KNOWN(
     
    192210
    193211# ifndef NDEBUG
    194         // in not NDEBUG case, number of comparison operations that change
     212        /// in not NDEBUG case, number of comparison operations that change
    195213        size_t CompareChange(void) const
    196214        {       return compare_change_; }
    197215# endif
    198216
    199         // calculate entire Jacobian
     217        /// calculate entire Jacobian
    200218        template <typename VectorBase>
    201219        VectorBase Jacobian(const VectorBase &x);
    202220
    203         // calculate Hessian for one component of f
     221        /// calculate Hessian for one component of f
    204222        template <typename VectorBase>
    205223        VectorBase Hessian(const VectorBase &x, const VectorBase &w);
     
    207225        VectorBase Hessian(const VectorBase &x, size_t i);
    208226
    209         // forward mode calculation of partial w.r.t one domain component
     227        /// forward mode calculation of partial w.r.t one domain component
    210228        template <typename VectorBase>
    211229        VectorBase ForOne(
     
    213231                size_t              j );
    214232
    215         // reverse mode calculation of derivative of one range component
     233        /// reverse mode calculation of derivative of one range component
    216234        template <typename VectorBase>
    217235        VectorBase RevOne(
     
    219237                size_t              i );
    220238
    221         // forward mode calculation of a subset of second order partials
     239        /// forward mode calculation of a subset of second order partials
    222240        template <typename VectorBase, typename VectorSize_t>
    223241        VectorBase ForTwo(
     
    226244                const VectorSize_t &K );
    227245
    228         // reverse mode calculation of a subset of second order partials
     246        /// reverse mode calculation of a subset of second order partials
    229247        template <typename VectorBase, typename VectorSize_t>
    230248        VectorBase RevTwo(
     
    233251                const VectorSize_t &J );
    234252
    235         // calculate sparse Jacobians
     253        /// calculate sparse Jacobians
    236254        template <typename VectorBase>
    237255        VectorBase SparseJacobian(const VectorBase &x);
    238256
     257        /// calculate sparse Jacobians
    239258        template <typename VectorBase, typename VectorBool>
    240259        VectorBase SparseJacobian(const VectorBase &x, const VectorBool &p);
    241260
    242         // calculate sparse Hessians
     261        /// calculate sparse Hessians
    243262        template <typename VectorBase>
    244263        VectorBase SparseHessian(const VectorBase &x, const VectorBase &w);
    245264
     265        /// calculate sparse Hessians
    246266        template <typename VectorBase, typename VectorBool>
    247267        VectorBase SparseHessian(
     
    250270
    251271        // Optimize the tape
     272        // (see doxygen documentation in optimize.hpp)
    252273        void optimize(void);
    253274        // ------------------- Deprecated -----------------------------
    254275
    255         // number of variables in opertion sequence
     276        /// deprecated: number of variables in opertion sequence
    256277        size_t Size(void) const
    257278        {       return total_num_var_; }
    258279
    259         // number of taylor_ coefficients currently stored (per variable)
     280        /// deprecated: # taylor_ coefficients currently stored (per variable)
    260281        size_t Order(void) const
    261282        {       return taylor_per_var_ - 1; }
    262283
    263         // amount of memory for each variable
     284        /// deprecated: amount of memory for each variable
    264285        size_t Memory(void) const
    265286        {       size_t pervar  = taylor_col_dim_ * sizeof(Base)
     
    270291        }
    271292
    272         // number of taylor_ coefficients currently calculated (per variable)
     293        /// deprecated: # taylor_ coefficients stored (per variable)
    273294        size_t taylor_size(void) const
    274295        {       return taylor_per_var_; }
     
    276297// ---------------------------------------------------------------------------
    277298
    278 } // END CppAD namespace
     299CPPAD_END_NAMESPACE
    279300
    280301// non-user interfaces
  • trunk/cppad/local/for_sparse_jac.hpp

    r1534 r1535  
    167167-----------------------------------------------------------------------------
    168168*/
    169 
    170 // BEGIN CppAD namespace
    171 namespace CppAD {
    172 
     169CPPAD_BEGIN_NAMESPACE
     170
     171/*!
     172\file for_sparse_jac.hpp
     173Forward mode Jacobian sparsity patterns.
     174*/
     175
     176/*!
     177Calculate Jacobian sparsity patterns using forward mode.
     178
     179The C++ source code corresponding to this operation is
     180\verbatim
     181        s = f.ForSparseJac(q, r, packed)
     182\endverbatim
     183
     184\tparam Base
     185is the base type for this recording.
     186
     187\tparam VectorBool
     188is a simple vector with elements of type bool.
     189
     190\tparam VectorSet
     191is either \c vector_pack or \c vector_set.
     192
     193\param q
     194is the number of columns in the matrix \f$ R \f$.
     195
     196\param r
     197is a sparsity pattern for the matrix \f$ R \f$.
     198
     199\param s
     200the input value of \a s must be a vector with size \c m*q
     201where \c m is the number of dependent variables
     202corresponding to the operation sequence stored in \a play.
     203The input value of its elements does not matter.
     204On output, the \a s is the sparsity pattern for the matrix
     205\f[
     206        J(x) = F^{(1)} (x) * R
     207\f]
     208where \f$ F \f$ is the function corresponding to the operation sequence
     209and \a x is any argument value.
     210
     211\param total_num_var
     212is the total number of variable in this recording.
     213
     214\param dep_taddr
     215maps dependendent variable index
     216to the corresponding variable in the tape.
     217
     218\param ind_taddr
     219maps independent variable index
     220to the corresponding variable in the tape.
     221
     222\param play
     223is the recording that defines the function we are computing the sparsity
     224pattern for.
     225
     226\param for_jac_sparsity
     227the input value of \a for_jac_sparsity does not matter.
     228On output, \a for_jac_sparsity.n_set() == \a total_num_var
     229and \a for_jac_sparsity.limit() == \a q.
     230It contains the forward sparsity pattern for all of the variables on the
     231tape (given the sparsity pattern for the independent variables is \f$ R \f$).
     232*/
    173233template <class Base, class VectorBool, class VectorSet>
    174234void ForSparseJac(
     
    242302}
    243303
     304
     305/*!
     306User API for Jacobian sparsity patterns using forward mode.
     307
     308The C++ source code corresponding to this operation is
     309\verbatim
     310        s = f.ForSparseJac(q, r, packed)
     311\endverbatim
     312
     313\tparam Base
     314is the base type for this recording.
     315
     316\tparam VectorBool
     317is a simple vector with elements of type bool.
     318
     319\param q
     320is the number of columns in the matrix \f$ R \f$.
     321
     322\param r
     323is a sparsity pattern for the matrix \f$ R \f$.
     324
     325\param packed
     326If \a packed is true, the type \c vector_pack is used for the calculations.
     327Otherwise the type \c vector_set is used for the calculations.
     328
     329\return
     330the return value \c s is a vector with size \c m*q
     331where \c m is the number of dependent variables
     332corresponding to the operation sequence stored in \c f.
     333The value of \a s is the sparsity pattern for the matrix
     334\f[
     335        J(x) = F^{(1)} (x) * R
     336\f]
     337where \f$ F \f$ is the function corresponding to the operation sequence
     338and \a x is any argument value.
     339
     340\par Side Effects
     341If \a packed is true,
     342the forward sparsity pattern for all of the variables on the
     343tape is stored in \c for_jac_sparse_pack__.
     344In this case
     345\verbatim
     346        for_jac_sparse_pack_.n_set() == total_num_var_
     347        for_jac_sparse_pack_.limit() == q
     348        for_jac_sparse_set_.n_set()  == 0
     349        for_jac_sparse_set_.limit()  == 0
     350\endverbatim
     351\n
     352\n
     353If \a packed is false,
     354the forward sparsity pattern for all of the variables on the
     355tape is stored in \c for_jac_sparse_set__.
     356In this case
     357\verbatim
     358        for_jac_sparse_set_.n_set()   == total_num_var_
     359        for_jac_sparse_set_.limit()   == q
     360        for_jac_sparse_pack_.n_set()  == 0
     361        for_jac_sparse_pack_.limit()  == 0
     362\endverbatim
     363*/
    244364template <class Base>
    245365template <class VectorBool>
    246366VectorBool ADFun<Base>::ForSparseJac(
    247         size_t             q      ,
    248         const VectorBool&  r      ,
    249         bool               packed )
     367        size_t             q             ,
     368        const VectorBool&  r             ,
     369        bool               packed        )
    250370{       size_t m = dep_taddr_.size();
    251371        VectorBool s( m * q );
     
    284404}
    285405
    286 } // END CppAD namespace
    287 
     406CPPAD_END_NAMESPACE
    288407# endif
  • trunk/cppad/local/optimize.hpp

    r1534 r1535  
    670670        }
    671671}
    672 CPPAD_END_NAMESPACE
    673672
    674673/*!
     
    685684*/
    686685template <class Base>
    687 void CppAD::ADFun<Base>::optimize(void)
     686void ADFun<Base>::optimize(void)
    688687{       // place to store the optimized version of the recording
    689688        recorder<Base> rec;
     
    751750}
    752751
     752CPPAD_END_NAMESPACE
    753753# endif
  • trunk/cppad/local/player.hpp

    r1497 r1535  
    109109        }
    110110
    111         /// Creating an operation sequence player from a recorder.
     111        /*!  Creating an object that palys back an operation sequence.
     112 
     113        \param rec
     114        the object that was used to record the operation sequence.
     115        */
    112116        void operator=(const recorder<Base> &rec)
    113117        {       size_t i;
  • trunk/cppad/local/rev_sparse_hes.hpp

    r1534 r1535  
    4848with respect to $latex u$$ at $latex u = 0$$ and with respect to x
    4949$latex \[
    50         H(x)  =  R^T * (S * F)^{(2)} ( x )
     50        H(x)  =  R^T * (S * F)^{(2)} ( x ) * R
    5151\] $$
    5252where $latex (S * F)^{(2)} (x)$$ is the Hessian of the scalar
     
    8888        size_t %q%
    8989%$$
    90 It specifies the number of columns in the Jacobian $latex J(x)$$.
     90It specifies the number of rows and columns in the Hessian $latex H(x)$$.
    9191It must be the same value as in the previous $xref/ForSparseJac/$$ call
    9292$syntax%
     
    206206# include <algorithm>
    207207
    208 // BEGIN CppAD namespace
    209 namespace CppAD {
     208CPPAD_BEGIN_NAMESPACE
     209/*!
     210\file rev_sparse_hes.hpp
     211Reverse mode Hessian sparsity patterns.
     212*/
     213
     214/*!
     215Calculate Hessian sparsity patterns using reverse mode.
     216
     217The C++ source code corresponding to this operation is
     218\verbatim
     219        h = f.RevSparseHes(q, s)
     220\endverbatim
     221
     222\tparam Base
     223is the base type for this recording.
     224
     225\tparam VectorBool
     226is a simple vector with elements of type bool.
     227
     228\tparam VectorSet
     229is either \c vector_pack or \c vector_set.
     230
     231\param q
     232is the value of \a q in the
     233by the previous call of the form
     234\verbatim
     235        f.ForSparseJac(q, r, packed)
     236\endverbatim
     237The value \c r in this call is a sparsity pattern for the matrix \f$ R \f$.
     238
     239\param s
     240is a vector with size \c m that specifies the sparsity pattern
     241for the vector \f$ S \f$,
     242where \c m is the number of dependent variables
     243corresponding to the operation sequence stored in \a play.
     244
     245\param h
     246the input value of \a h must be a vector with size \c q*q.
     247The input value of its elements does not matter.
     248On output, \a h is the sparsity pattern for the matrix
     249\f[
     250        H(x) = R^T ( S * F)^{(2)} (x) * R
     251\f]
     252where \f$ F \f$ is the function corresponding to the operation sequence
     253and \a x is any argument value.
     254
     255\param total_num_var
     256is the total number of variables in this recording.
     257
     258\param dep_taddr
     259maps dependendent variable index
     260to the corresponding variable in the tape.
     261
     262\param ind_taddr
     263maps independent variable index
     264to the corresponding variable in the tape.
     265
     266\param play
     267is the recording that defines the function we are computing the sparsity
     268pattern for.
     269
     270\param for_jac_sparsity
     271is a  vector of sets containing the
     272the forward sparsity pattern for all of the variables on the tape.
     273*/
    210274
    211275template <class Base, class VectorBool, class VectorSet>
     
    296360        return;
    297361}
     362
     363
     364/*!
     365User API for Hessian sparsity patterns using reverse mode.
     366
     367The C++ source code corresponding to this operation is
     368\verbatim
     369        h = f.RevSparseHes(q, r, packed)
     370\endverbatim
     371
     372\tparam Base
     373is the base type for this recording.
     374
     375\tparam VectorBool
     376is a simple vector with elements of type bool.
     377
     378\param q
     379is the value of \a q in the
     380by the previous call of the form
     381\verbatim
     382        f.ForSparseJac(q, r, packed)
     383\endverbatim
     384The value \c r in this call is a sparsity pattern for the matrix \f$ R \f$.
     385
     386\param s
     387is a vector with size \c m that specifies the sparsity pattern
     388for the vector \f$ S \f$,
     389where \c m is the number of dependent variables
     390corresponding to the operation sequence stored in \a play.
     391
     392\return
     393is a vector with size \c q*q.
     394containing a sparsity pattern for the matrix
     395\f[
     396        H(x) = R^T ( S * F)^{(2)} (x) * R
     397\f]
     398where \f$ F \f$ is the function corresponding to the operation sequence
     399and \a x is any argument value.
     400*/
    298401
    299402template <class Base>
     
    334437}
    335438
    336 } // END CppAD namespace
    337        
     439CPPAD_END_NAMESPACE
    338440# endif
  • trunk/cppad/local/rev_sparse_jac.hpp

    r1533 r1535  
    166166-----------------------------------------------------------------------------
    167167*/
    168 
    169 // BEGIN CppAD namespace
    170 namespace CppAD {
     168CPPAD_BEGIN_NAMESPACE
     169
     170/*!
     171\file rev_sparse_jac.hpp
     172Reverse mode Jacobian sparsity patterns.
     173*/
     174
     175/*!
     176Calculate Jacobian sparsity patterns using reverse mode.
     177
     178The C++ source code corresponding to this operation is
     179\verbatim
     180        s = f.RevSparseJac(q, r, packed)
     181\endverbatim
     182
     183\tparam Base
     184is the base type for this recording.
     185
     186\tparam VectorBool
     187is a simple vector with elements of type bool.
     188
     189\tparam VectorSet
     190is either \c vector_pack or \c vector_set.
     191
     192\param p
     193is the number of rows in the matrix \f$ S \f$.
     194
     195\param s
     196is a sparsity pattern for the matrix \f$ S \f$.
     197
     198\param r
     199the input value of \a r must be a vector with size \c p*n
     200where \c n is the number of independent variables
     201corresponding to the operation sequence stored in \a play.
     202The input value of its elements does not matter.
     203On output, \a r is the sparsity pattern for the matrix
     204\f[
     205        J(x) = S * F^{(1)} (x)
     206\f]
     207where \f$ F \f$ is the function corresponding to the operation sequence
     208and \a x is any argument value.
     209
     210\param total_num_var
     211is the total number of variable in this recording.
     212
     213\param dep_taddr
     214maps dependendent variable index
     215to the corresponding variable in the tape.
     216
     217\param ind_taddr
     218maps independent variable index
     219to the corresponding variable in the tape.
     220
     221\param play
     222is the recording that defines the function we are computing the sparsity
     223pattern for.
     224*/
    171225
    172226template <class Base, class VectorBool, class VectorSet>
     
    242296}
    243297
     298/*!
     299User API for Jacobian sparsity patterns using reverse mode.
     300
     301The C++ source code corresponding to this operation is
     302\verbatim
     303        s = f.RevSparseJac(q, r, packed)
     304\endverbatim
     305
     306\tparam Base
     307is the base type for this recording.
     308
     309\tparam VectorBool
     310is a simple vector with elements of type bool.
     311
     312\param p
     313is the number of rows in the matrix \f$ S \f$.
     314
     315\param s
     316is a sparsity pattern for the matrix \f$ S \f$.
     317
     318\param packed
     319If \a packed is true, the type \c vector_pack is used for the calculations.
     320Otherwise the type \c vector_set is used for the calculations.
     321
     322\return
     323the return value \c r is a vector with size \c p*n
     324where \c n is the number of independent variables
     325corresponding to the operation sequence stored in \c f.
     326The value of \a r is the sparsity pattern for the matrix
     327\f[
     328        J(x) = S * F^{(1)} (x)
     329\f]
     330where \f$ F \f$ is the function corresponding to the operation sequence
     331and \a x is any argument value.
     332*/
    244333template <class Base>
    245334template <class VectorBool>
     
    276365}
    277366
    278 } // END CppAD namespace
    279        
    280 
     367CPPAD_END_NAMESPACE
    281368# endif
  • trunk/cppad/local/vector_pack.hpp

    r1530 r1535  
    6666        // -----------------------------------------------------------------
    6767        /*! Make use of copy constructor an error
     68 
     69        \param v
     70        vector that we are attempting to make a copy of.
    6871        */
    6972        vector_pack(const vector_pack& v)
  • trunk/cppad/local/vector_set.hpp

    r1529 r1535  
    5656        // -----------------------------------------------------------------
    5757        /*! Make use of copy constructor an error
     58 
     59        \param v
     60        vector that we are attempting to make a copy of.
    5861        */
    5962        vector_set(const vector_set& v)
  • trunk/omh/whats_new_09.omh

    r1533 r1535  
    5656trying to read and understand the CppAD source code.)
    5757
     58$head 09-29$$
     59The documentation definition of the function $latex H(x)$$ in
     60$cref/RevSparseHes/$$ was missing a factor of $latex R$$.
     61This has been fixed.
     62
    5863$head 09-28$$
    5964Changed $cref/RevSparseHes/$$ so that it uses a sparse
Note: See TracChangeset for help on using the changeset viewer.