Changeset 3071 for trunk/test_more/mul_level.cpp
 Timestamp:
 Dec 31, 2013 11:02:27 PM (6 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test_more/mul_level.cpp
r2794 r3071 36 36 size_t n = 2; // dimension for example 37 37 38 CPPAD_TESTVECTOR(ADdouble) a_x(n);38 // value of the independent variables 39 39 CPPAD_TESTVECTOR(ADDdouble) aa_x(n); 40 41 // value of the independent variables 42 a_x[0] = 2.; a_x[1] = 3.; 43 Independent(a_x); 44 aa_x[0] = a_x[0]; aa_x[1] = a_x[1]; 40 aa_x[0] = 1.; aa_x[1] = 3.; // test conversion double to AD< AD<double> > 41 aa_x[0] = 2. * aa_x[0]; // test double * AD< AD<double> > 45 42 CppAD::Independent(aa_x); 46 43 … … 50 47 CppAD::ADFun<ADdouble> F(aa_x, aa_f); 51 48 52 // reevaluate f(2, 3) (must get proper deepedence on a_x). 49 // value of the independent variables 50 CPPAD_TESTVECTOR(ADdouble) a_x(n); 51 a_x[0] = 2.; a_x[1] = 3.; 52 Independent(a_x); 53 54 // reevaluate f(2, 3) (must get deepedence on a_x). 53 55 size_t p = 0; 54 56 CPPAD_TESTVECTOR(ADdouble) a_fp(1);
Note: See TracChangeset
for help on using the changeset viewer.