ESyS-Particle  4.0.1
Public Member Functions
CubicEquation Class Reference

A class for a cubic equation. Used for eigenvalue calculation on 3D matrices. More...

#include <cube_eq.h>

List of all members.

Public Member Functions

 CubicEquation (double, double, double)
set< double > getRealRoots (double)

Detailed Description

A class for a cubic equation. Used for eigenvalue calculation on 3D matrices.

Author:
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

CubicEquation::CubicEquation ( double  a,
double  b,
double  c 
)

construct cubic equation of the form x^3+ax^2+bx+c

Parameters:
acoefficient for x^2
bcoefficient for x
cconstant coefficient

Member Function Documentation

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:
tolthe precision of the calculation
validreturns the validity of the result, i.e. if valid==false there was no positive root found

Referenced by Matrix3::eigen().

Here is the caller graph for this function:


The documentation for this class was generated from the following files: