A class for a cubic equation. Used for eigenvalue calculation on 3D matrices.
More...
A class for a cubic equation. Used for eigenvalue calculation on 3D matrices.
- Author
- Steffen Abe $Revision$ $Date$
| set< double > CubicEquation::getRealRoots |
( |
double |
tol | ) |
|
Get the roots. Get one root (r_1) by a bisection method and the other 2 (if real) by solving the quadratic equation resulting from dividing the eqation by (x-r_1). Returns the roots as a STL-set so they are ordered.
- Parameters
-
| tol | the precision of the calculation |
| valid | returns the validity of the result, i.e. if valid==false there was no positive root found |
References bisect(), f(), m_a, m_b, and m_c.
Referenced by Matrix3::eigen().