Ignore:
Timestamp:
Jun 28, 2016 10:26:48 AM (4 years ago)
Author:
bradbell
Message:

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

commit 59a1b159a8d223b912db4ef8dc502a9294b44e3b
Author: Brad Bell <bradbell@…>
Date: Tue Jun 28 06:23:44 2016 -0700

atomic branch:
remove size specific information for eigen_mat_inv object.


eigen_mat_mul.hpp: comment where all to CppAD base object occurs.
atomic_base.hpp: fix discussion of x in sparsity calculations.

commit 7e14e2ae878d8be820beb431426b6d3cf8d4ea91
Author: Brad Bell <bradbell@…>
Date: Mon Jun 27 12:55:38 2016 -0700

atomic branch:
Make it so eigen_mat_mul.hpp works for any matrix product.

commit b0472ec5b071893b26feb53eafecc8272a2ff765
Author: Brad Bell <bradbell@…>
Date: Mon Jun 27 11:21:23 2016 -0700

atomic branch:
Change x parameter in atomic sparsity functions from in to Base type.
batch_edit.sh: only run sed on source files that change.

commit bc75941594ca856c155ec5b7820c7c30822dda80
Author: Brad Bell <bradbell@…>
Date: Mon Jun 27 10:34:06 2016 -0700

atomic branch:
Add parameter part of x to atomic_base::rev_sparse_hes function.


rev_jac_sweep.hpp: no need to skip check (small overhead for this case).

commit 0c5d06cee77c8687f56fc971a90d29639f7277bc
Author: Brad Bell <bradbell@…>
Date: Mon Jun 27 09:34:34 2016 -0700

atomic branch:
Add parameter part of x to atomic_base::for_sparse_hes function.


for_jac_sweep.hpp: minor white spacing change.

commit 6e856948a76aa8acea8e7f004974720d5dcfe0cb
Author: Brad Bell <bradbell@…>
Date: Mon Jun 27 07:37:52 2016 -0700

atomic branch:
Fix check_all.sh failure in test_more/optimize.cpp.
optimize.hpp: pass atomic function parameters to rev_sparse_jac.
rev_jac_sweep.hpp: remove duplicated code.

commit 67bc0cdd0b6c7ef98838c1ce82584b09503f2886
Author: Brad Bell <bradbell@…>
Date: Sun Jun 26 23:24:55 2016 -0700

atomic branch:
Add paramaeter part of x to atomic_base::rev_sparse_jac function.

commit c113a4bd6d97c7266ffa9e5cc3050f63a82193b7
Author: Brad Bell <bradbell@…>
Date: Sun Jun 26 22:35:13 2016 -0700

atomic branch:
eigen_mat_mul.hpp: start conversion from member data to parameter data.

commit cc6d5c642839f298aef1e7aaeac89fea0124f889
Author: Brad Bell <bradbell@…>
Date: Sun Jun 26 18:48:37 2016 -0700

atomic branch:
Add x integer information to atomic_base::for_sparse_jac.


eigen_mat_mul.hpp: Change example to pack integers in x.

commit 0ba682bd3baa3dbb0427076dcddb225f0e4a8997
Author: Brad Bell <bradbell@…>
Date: Sun Jun 26 07:31:21 2016 -0700

test_one.sh.in: add message about library path for cppad_lib.

commit 867656b13ea4ecf2c230c1c1eaab34a8a3da0cca
Author: Brad Bell <bradbell@…>
Date: Sun Jun 26 06:26:09 2016 -0700

  1. Improve discussion of Matrix reverse mode calculations.
  2. Remove privative functions that are not being used.
  3. Advance to cppad-20160626.
File:
1 edited

Legend:

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

    r3809 r3820  
    10191019
    10201020$head Syntax$$
    1021 $icode%ok% = %afun%.for_sparse_jac(%q%, %r%, %s%)%$$
     1021$icode%ok% = %afun%.for_sparse_jac(%q%, %r%, %s%)
     1022%$$
     1023$icode%ok% = %afun%.for_sparse_jac(%q%, %r%, %s%, %x%)
     1024%$$
    10221025
    10231026$head Purpose$$
     
    10371040$cref ForSparseHes$$, or
    10381041$cref RevSparseHes$$,
    1039 this virtual function must be defined by the
     1042one of the versions of this
     1043virtual function must be defined by the
    10401044$cref/atomic_user/atomic_ctor/atomic_user/$$ class.
    10411045
     
    10681072$latex S(x) \in B^{m \times q}$$.
    10691073
     1074$subhead x$$
     1075$index deprecated$$
     1076The argument has prototype
     1077$codei%
     1078        const CppAD::vector<%Base%>& %x%
     1079%$$
     1080and size is equal to the $icode n$$.
     1081This is the $cref Value$$ value corresponding to the parameters in the
     1082vector $cref/ax/atomic_afun/ax/$$ (when the atomic function was called).
     1083To be specific, if
     1084$codei%
     1085        if( Parameter(%ax%[%i%]) == true )
     1086                %x%[%i%] = Value( %ax%[%i%] );
     1087        else
     1088                %x%[%i%] = CppAD::numeric_limits<%Base%>::quiet_NaN();
     1089%$$
     1090The version of this function with out the $icode x$$ argument is deprecated;
     1091i.e., you should include the argument even if you do not use it.
     1092
    10701093$head ok$$
    10711094The return value $icode ok$$ has prototype
     
    10981121\param s
    10991122is the Jacobian sparsity pattern for the result vector y
    1100 */
     1123
     1124\param x
     1125is the integer value for x arguments that are parameters.
     1126*/
     1127virtual bool for_sparse_jac(
     1128        size_t                                  q  ,
     1129        const vector< std::set<size_t> >&       r  ,
     1130              vector< std::set<size_t> >&       s  ,
     1131        const vector<Base>&                     x  )
     1132{       return false; }
     1133virtual bool for_sparse_jac(
     1134        size_t                                  q  ,
     1135        const vector<bool>&                     r  ,
     1136              vector<bool>&                     s  ,
     1137        const vector<Base>&                     x  )
     1138{       return false; }
     1139virtual bool for_sparse_jac(
     1140        size_t                                  q  ,
     1141        const vectorBool&                       r  ,
     1142              vectorBool&                       s  ,
     1143        const vector<Base>&                     x  )
     1144{       return false; }
     1145// deprecated versions
    11011146virtual bool for_sparse_jac(
    11021147        size_t                                  q  ,
     
    11341179
    11351180$head Syntax$$
    1136 $icode%ok% = %afun%.rev_sparse_jac(%q%, %rt%, %st%)%$$
     1181$icode%ok% = %afun%.rev_sparse_jac(%q%, %rt%, %st%)
     1182%$$
     1183$icode%ok% = %afun%.rev_sparse_jac(%q%, %rt%, %st%, %x%)
     1184%$$
    11371185
    11381186$head Purpose$$
    1139 This function is used by $cref RevSparseJac$$ to compute
     1187This function is used by
     1188$cref RevSparseJac$$ to compute
    11401189Jacobian sparsity patterns.
     1190If you are using $cref RevSparseJac$$,
     1191one of the versions of this
     1192virtual function must be defined by the
     1193$cref/atomic_user/atomic_ctor/atomic_user/$$ class.
     1194$pre
     1195
     1196$$
    11411197For a fixed matrix $latex R \in B^{q \times m}$$,
    11421198the Jacobian of $latex R * f( x )$$ with respect to $latex x \in B^n$$ is
     
    11821238$latex S(x)^\R{T} \in B^{n \times q}$$.
    11831239
     1240$subhead x$$
     1241$index deprecated$$
     1242The argument has prototype
     1243$codei%
     1244        const CppAD::vector<%Base%>& %x%
     1245%$$
     1246and size is equal to the $icode n$$.
     1247This is the $cref Value$$ corresponding to the parameters in the
     1248vector $cref/ax/atomic_afun/ax/$$ (when the atomic function was called).
     1249To be specific, if
     1250$codei%
     1251        if( Parameter(%ax%[%i%]) == true )
     1252                %x%[%i%] = Value( %ax%[%i%] );
     1253        else
     1254                %x%[%i%] = CppAD::numeric_limits<%Base%>::quiet_NaN();
     1255%$$
     1256The version of this function with out the $icode x$$ argument is deprecated;
     1257i.e., you should include the argument even if you do not use it.
     1258
    11841259$head ok$$
    11851260The return value $icode ok$$ has prototype
     
    12121287\param st [in]
    12131288is the tansposed Jacobian sparsity pattern for the argument variables x
    1214 */
     1289
     1290\param x
     1291is the integer value for x arguments that are parameters.
     1292*/
     1293virtual bool rev_sparse_jac(
     1294        size_t                                  q  ,
     1295        const vector< std::set<size_t> >&       rt ,
     1296              vector< std::set<size_t> >&       st ,
     1297        const vector<Base>&                     x  )
     1298{       return false; }
     1299virtual bool rev_sparse_jac(
     1300        size_t                                  q  ,
     1301        const vector<bool>&                     rt ,
     1302              vector<bool>&                     st ,
     1303        const vector<Base>&                     x  )
     1304{       return false; }
     1305virtual bool rev_sparse_jac(
     1306        size_t                                  q  ,
     1307        const vectorBool&                       rt ,
     1308              vectorBool&                       st ,
     1309        const vector<Base>&                     x  )
     1310{       return false; }
     1311// deprecated versions
    12151312virtual bool rev_sparse_jac(
    12161313        size_t                                  q  ,
     
    12481345
    12491346$head Syntax$$
    1250 $icode%ok% = %afun%.for_sparse_hes(%vx%, %r%, %s%, %h%)%$$
     1347$icode%ok% = %afun%.for_sparse_hes(%vx%, %r%, %s%, %h%
     1348)%$$
     1349$icode%ok% = %afun%.for_sparse_hes(%vx%, %r%, %s%, %h%, %x%
     1350)%$$
    12511351
    12521352$head Purpose$$
    12531353This function is used by $cref ForSparseHes$$ to compute
    12541354Hessian sparsity patterns.
     1355If you are using $cref ForSparseHes$$,
     1356one of the versions of this
     1357virtual function must be defined by the
     1358$cref/atomic_user/atomic_ctor/atomic_user/$$ class.
     1359$pre
     1360
     1361$$
    12551362Given a $cref/sparsity pattern/glossary/Sparsity Pattern/$$ for
    12561363a diagonal matrix $latex R \in B^{n \times n}$$, and
     
    13071414$latex H(x) \in B^{n \times n}$$ which is defined above.
    13081415
     1416$subhead x$$
     1417$index deprecated$$
     1418The argument has prototype
     1419$codei%
     1420        const CppAD::vector<%Base%>& %x%
     1421%$$
     1422and size is equal to the $icode n$$.
     1423This is the $cref Value$$ value corresponding to the parameters in the
     1424vector $cref/ax/atomic_afun/ax/$$ (when the atomic function was called).
     1425To be specific, if
     1426$codei%
     1427        if( Parameter(%ax%[%i%]) == true )
     1428                %x%[%i%] = Value( %ax%[%i%] );
     1429        else
     1430                %x%[%i%] = CppAD::numeric_limits<%Base%>::quiet_NaN();
     1431%$$
     1432The version of this function with out the $icode x$$ argument is deprecated;
     1433i.e., you should include the argument even if you do not use it.
     1434
    13091435$children%
    13101436        example/atomic/for_sparse_hes.cpp
     
    13321458\param h [out]
    13331459is the Hessian sparsity pattern w.r.t the argument vector x.
    1334 */
     1460
     1461\param x
     1462is the integer value of the x arguments that are parameters.
     1463*/
     1464virtual bool for_sparse_hes(
     1465        const vector<bool>&             vx ,
     1466        const vector<bool>&             r  ,
     1467        const vector<bool>&             s  ,
     1468        vector< std::set<size_t> >&     h  ,
     1469        const vector<Base>&             x  )
     1470{       return false; }
     1471virtual bool for_sparse_hes(
     1472        const vector<bool>&             vx ,
     1473        const vector<bool>&             r  ,
     1474        const vector<bool>&             s  ,
     1475        vector<bool>&                   h  ,
     1476        const vector<Base>&             x  )
     1477{       return false; }
     1478virtual bool for_sparse_hes(
     1479        const vector<bool>&             vx ,
     1480        const vector<bool>&             r  ,
     1481        const vector<bool>&             s  ,
     1482        vectorBool&                     h  ,
     1483        const vector<Base>&             x  )
     1484// deprecated
     1485{       return false; }
    13351486virtual bool for_sparse_hes(
    13361487        const vector<bool>&             vx ,
     
    13391490        vector< std::set<size_t> >&     h  )
    13401491{       return false; }
     1492// deprecated versions
    13411493virtual bool for_sparse_hes(
    13421494        const vector<bool>&             vx ,
     
    13711523
    13721524$head Syntax$$
    1373 $icode%ok% = %afun%.rev_sparse_hes(%vx%, %s%, %t%, %q%, %r%, %u%, %v%)%$$
     1525$icode%ok% = %afun%.rev_sparse_hes(%vx%, %s%, %t%, %q%, %r%, %u%, %v%
     1526)%$$
     1527$icode%ok% = %afun%.rev_sparse_hes(%vx%, %s%, %t%, %q%, %r%, %u%, %v%, %x%
     1528)%$$
    13741529
    13751530$head Purpose$$
    13761531This function is used by $cref RevSparseHes$$ to compute
    13771532Hessian sparsity patterns.
     1533If you are using $cref RevSparseHes$$ to compute
     1534one of the versions of this
     1535virtual function muse be defined by the
     1536$cref/atomic_user/atomic_ctor/atomic_user/$$ class.
     1537$pre
     1538
     1539$$
    13781540There is an unspecified scalar valued function
    13791541$latex g : B^m \rightarrow B$$.
     
    15021664\] $$
    15031665
     1666$subhead x$$
     1667$index deprecated$$
     1668The argument has prototype
     1669$codei%
     1670        const CppAD::vector<%Base%>& %x%
     1671%$$
     1672and size is equal to the $icode n$$.
     1673This is the $cref Value$$ value corresponding to the parameters in the
     1674vector $cref/ax/atomic_afun/ax/$$ (when the atomic function was called).
     1675To be specific, if
     1676$codei%
     1677        if( Parameter(%ax%[%i%]) == true )
     1678                %x%[%i%] = Value( %ax%[%i%] );
     1679        else
     1680                %x%[%i%] = CppAD::numeric_limits<%Base%>::quiet_NaN();
     1681%$$
     1682The version of this function with out the $icode x$$ argument is deprecated;
     1683i.e., you should include the argument even if you do not use it.
     1684
    15041685$children%
    15051686        example/atomic/rev_sparse_hes.cpp
     
    15361717\param v [out]
    15371718is the Hessian sparsity pattern w.r.t the argument vector x.
    1538 */
     1719
     1720\param x [in]
     1721is the integer value of the x arguments that are parameters.
     1722*/
     1723virtual bool rev_sparse_hes(
     1724        const vector<bool>&                     vx ,
     1725        const vector<bool>&                     s  ,
     1726              vector<bool>&                     t  ,
     1727        size_t                                  q  ,
     1728        const vector< std::set<size_t> >&       r  ,
     1729        const vector< std::set<size_t> >&       u  ,
     1730              vector< std::set<size_t> >&       v  ,
     1731        const vector<Base>&                     x  )
     1732{       return false; }
     1733virtual bool rev_sparse_hes(
     1734        const vector<bool>&                     vx ,
     1735        const vector<bool>&                     s  ,
     1736              vector<bool>&                     t  ,
     1737        size_t                                  q  ,
     1738        const vector<bool>&                     r  ,
     1739        const vector<bool>&                     u  ,
     1740              vector<bool>&                     v  ,
     1741        const vector<Base>&                     x  )
     1742{       return false; }
     1743virtual bool rev_sparse_hes(
     1744        const vector<bool>&                     vx ,
     1745        const vector<bool>&                     s  ,
     1746              vector<bool>&                     t  ,
     1747        size_t                                  q  ,
     1748        const vectorBool&                       r  ,
     1749        const vectorBool&                       u  ,
     1750              vectorBool&                       v  ,
     1751        const vector<Base>&                     x  )
     1752{       return false; }
     1753// deprecated
    15391754virtual bool rev_sparse_hes(
    15401755        const vector<bool>&                     vx ,
     
    16331848Set value of id (used by deprecated old_atomic class)
    16341849
    1635 This function is called just before calling any of the virtual funcitons
     1850This function is called just before calling any of the virtual function
    16361851and has the corresponding id of the corresponding virtual call.
    16371852*/
Note: See TracChangeset for help on using the changeset viewer.