<?xml version='1.0'?> <?xml-stylesheet type='text/xsl' href='pmathml.xsl'?> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title>Source: det_33</title> <meta name="description" id="description" content="Source: det_33"/> <meta name="keywords" id="keywords" content=" det_33 source "/> <style type='text/css'> body { color : black } body { background-color : white } A:link { color : blue } A:visited { color : purple } A:active { color : purple } </style> <script type='text/javascript' language='JavaScript' src='_det_33.hpp_xml.js'> </script> </head> <body> <table><tr> <td> <a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a> </td> <td><a href="det_33.xml" target="_top">Prev</a> </td><td><a href="det_grad_33.xml" target="_top">Next</a> </td><td> <select onchange='choose_across0(this)'> <option>Index-></option> <option>contents</option> <option>reference</option> <option>index</option> <option>search</option> <option>external</option> </select> </td> <td> <select onchange='choose_up0(this)'> <option>Up-></option> <option>CppAD</option> <option>Appendix</option> <option>speed</option> <option>speed_utility</option> <option>det_33</option> <option>det_33.hpp</option> </select> </td> <td> <select onchange='choose_down3(this)'> <option>speed-></option> <option>speed_main</option> <option>speed_utility</option> <option>speed_double</option> <option>speed_adolc</option> <option>speed_cppad</option> <option>speed_fadbad</option> <option>speed_sacado</option> </select> </td> <td> <select onchange='choose_down2(this)'> <option>speed_utility-></option> <option>uniform_01</option> <option>det_of_minor</option> <option>det_by_minor</option> <option>det_by_lu</option> <option>det_33</option> <option>det_grad_33</option> <option>ode_evaluate</option> <option>sparse_evaluate</option> </select> </td> <td> <select onchange='choose_down1(this)'> <option>det_33-></option> <option>det_33.hpp</option> </select> </td> <td>det_33.hpp</td> <td>Headings</td> </tr></table><br/> <center><b><big><big>Source: det_33</big></big></b></center> <code><font color="blue"># ifndef CPPAD_DET_33_INCLUDED <code><span style='white-space: nowrap'><br/> </span></code># define CPPAD_DET_33_INCLUDED <pre style='display:inline'> # include <cppad/near_equal.hpp> namespace CppAD { template <class Vector> bool det_33(const Vector &x, const Vector &d) { bool ok = true; // use expansion by minors to compute the determinant by hand double check = 0.; check += x[0] * ( x[4] * x[8] - x[5] * x[7] ); check -= x[1] * ( x[3] * x[8] - x[5] * x[6] ); check += x[2] * ( x[3] * x[7] - x[4] * x[6] ); ok &= CppAD::<a href="nearequal.xml" target="_top">NearEqual</a>(check, d[0], 1e-10, 1e-10); return ok; } }</pre> # endif </font></code> <hr/>Input File: omh/det_33_hpp.omh </body> </html>