Changeset 3812 for trunk/test_more


Ignore:
Timestamp:
Mar 27, 2016 12:48:08 PM (4 years ago)
Author:
bradbell
Message:

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 33d1f5b8d837d83c8baf656045d85d8b45f0b297
end hash code: 30860e98aa7f7b69ac6deb83ed8e564a46ef96a1

commit 30860e98aa7f7b69ac6deb83ed8e564a46ef96a1
Author: Brad Bell <bradbell@…>
Date: Sun Mar 27 09:09:58 2016 -0700

eigen_mat_inv.hpp: use a simple over estimate of output variables.
eigen_mat_inv.cpp: remove test of output variable information.
eigen_mat_inv.cpp: prepare for more tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/eigen_mat_inv.cpp

    r3811 r3812  
    1010Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1111-------------------------------------------------------------------------- */
     12# include <cppad/cppad.hpp>
     13# include <cppad/example/eigen_mat_inv.hpp>
     14
     15namespace { // BEGIN_EMPTY_NAMESPACE
     16
     17typedef double                                            scalar;
     18typedef CppAD::AD<scalar>                                 ad_scalar;
     19typedef typename atomic_eigen_mat_inv<scalar>::ad_matrix  ad_matrix;
     20
     21scalar eps = 10. * std::numeric_limits<scalar>::epsilon();
     22using CppAD::NearEqual;
     23// --------------------------------------------------------------------------
    1224/*
    1325Test atomic_eigen_mat_inv using a non-symetric matrix
     
    2436y[3] = x[0] / (x[0] * x[1] + 2)
    2537*/
    26 # include <cppad/cppad.hpp>
    27 # include <cppad/example/eigen_mat_inv.hpp>
    28 
    29 
    30 bool eigen_mat_inv(void)
     38bool non_symmetric(void)
    3139{
    32         typedef double                                            scalar;
    33         typedef CppAD::AD<scalar>                                 ad_scalar;
    34         typedef typename atomic_eigen_mat_inv<scalar>::ad_matrix  ad_matrix;
    35         //
    3640        bool ok    = true;
    37         scalar eps = 10. * std::numeric_limits<scalar>::epsilon();
    38         using CppAD::NearEqual;
    3941        // -------------------------------------------------------------------
    40         // object that computes invers of a 2x2 matrix
     42        // object that computes inverse of a 2x2 matrix
    4143        size_t nr  = 2;
    4244        atomic_eigen_mat_inv<scalar> mat_inv(nr);
     
    157159        return ok;
    158160}
     161
     162} // END_EMPTY_NAMESPACE
     163
     164bool eigen_mat_inv(void)
     165{       bool ok = true;
     166        ok     &= non_symmetric();
     167        return ok;
     168}
Note: See TracChangeset for help on using the changeset viewer.