Eq2deg
|
#include <Eq2deg.hpp>
Classes | |
struct | NegativeDeltaException |
Object to handle exception when no reals roots exists. More... | |
Public Member Functions | |
Eq2deg (const double &iA, const double &iB, const double &iC) | |
Construct a new Eq2deg object. More... | |
virtual | ~Eq2deg () |
virtual void | computeDelta () |
compute the discriminant and raise an exception if negative More... | |
virtual void | computeRoots () |
Compute the roots. More... | |
double | getRoot (const int &iRootNumber) const |
Get the root value by number. More... | |
virtual double | getDelta () |
Get the discriminant. More... | |
Public Member Functions inherited from Utilities | |
void | toStream (std::ostream &ioOut) const |
Protected Attributes | |
double | m_a |
double | m_b |
double | m_c |
double | m_delta |
std::vector< double > | m_rac |
CS-17, Eq2deg.hpp Base class to manage quadratics equations a*x^2+b*x+c=0
with the following restrictions: The coefficients are real The roots are real In case of complex roots an exception is thrown
Eq2deg::Eq2deg | ( | const double & | iA, |
const double & | iB, | ||
const double & | iC | ||
) |
Construct a new Eq2deg object.
a | double: coefficent of x^2 |
b | double: coefficient of x |
c | double: constant |
|
virtual |
|
virtual |
compute the discriminant and raise an exception if negative
Reimplemented in Eq2degComp.
|
virtual |
Compute the roots.
Reimplemented in Eq2degComp.
|
virtual |
Get the discriminant.
double Eq2deg::getRoot | ( | const int & | iRootNumber | ) | const |
Get the root value by number.
rootNumber | the number of the root to retrieve (1 or 2) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |