Eq2deg
Public Member Functions | Protected Attributes | List of all members
Eq2degComp Class Reference

#include <Eq2degComp.hpp>

Inheritance diagram for Eq2degComp:
Inheritance graph
[legend]
Collaboration diagram for Eq2degComp:
Collaboration graph
[legend]

Public Member Functions

 Eq2degComp (const double &iA, const double &iB, const double &iC)
 Construct a new Eq2degComp object. More...
 
virtual ~Eq2degComp ()
 
virtual void computeDelta ()
 compute the discriminant More...
 
virtual void computeRoots ()
 Compute the roots. More...
 
std::complex< double > getRoot (const int &iRootNumber) const
 Get the root value by number. More...
 
- Public Member Functions inherited from Eq2deg
 Eq2deg (const double &iA, const double &iB, const double &iC)
 Construct a new Eq2deg object. More...
 
virtual ~Eq2deg ()
 
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

bool m_complexRoots
 
std::vector< std::complex< double > > m_rac
 
- Protected Attributes inherited from Eq2deg
double m_a
 
double m_b
 
double m_c
 
double m_delta
 
std::vector< double > m_rac
 

Detailed Description

CS-17, Eq2degComp.hpp Derived class to manage quadratics equations with complex roots a*x^2+b*x+c=0

with the following restrictions: The coefficients are real

Author
Christophe Gattardi
Version
1.0 15/03/2020

Constructor & Destructor Documentation

◆ Eq2degComp()

Eq2degComp::Eq2degComp ( const double &  iA,
const double &  iB,
const double &  iC 
)

Construct a new Eq2degComp object.

Parameters
adouble: coefficent of x^2
bdouble: coefficient of x
cdouble: constant

◆ ~Eq2degComp()

Eq2degComp::~Eq2degComp ( )
virtual

Member Function Documentation

◆ computeDelta()

void Eq2degComp::computeDelta ( )
virtual

compute the discriminant

Reimplemented from Eq2deg.

◆ computeRoots()

void Eq2degComp::computeRoots ( )
virtual

Compute the roots.

Reimplemented from Eq2deg.

◆ getRoot()

std::complex< double > Eq2degComp::getRoot ( const int &  iRootNumber) const

Get the root value by number.

Parameters
rootNumberthe number of the root to retrieve (1 or 2)
Returns
double

Member Data Documentation

◆ m_complexRoots

bool Eq2degComp::m_complexRoots
protected

◆ m_rac

std::vector<std::complex<double> > Eq2degComp::m_rac
protected

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