aimstil  5.0.5
til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy > Class Template Reference

Find real roots of a polynomial. More...

#include <cathier/poly_solver.h>

Public Member Functions

 PolySolver_real ()
 
int nsols () const
 Return the number of solutions. More...
 
const TPrec * sols () const
 Return an array containing the solutions. More...
 
TInfinitySolutionsPolicy getInfSolPolicy () const
 Return the "infinity of solutions" policy. More...
 
void solve (TPrec a, TPrec b)
 solve first order polynomial equation [ a X + b = 0] More...
 
void solve (TPrec a, TPrec b, TPrec c)
 solve 2nd order polynomial equation [ a X^2 + b X + C = 0] More...
 

Friends

class policy::InfinitySolutions_None
 

Detailed Description

template<typename TPrec, typename TInfinitySolutionsPolicy>
class til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >

Find real roots of a polynomial.

The Infinity Solutions Policy tells what to do in case there are an infinity of solutions. There is no default policy, because this is an important choice that can be too easily ignored.

Definition at line 22 of file poly_solver.h.

Constructor & Destructor Documentation

◆ PolySolver_real()

template<typename TPrec, typename TInfinitySolutionsPolicy>
til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::PolySolver_real ( )
inline

Definition at line 26 of file poly_solver.h.

Member Function Documentation

◆ getInfSolPolicy()

template<typename TPrec, typename TInfinitySolutionsPolicy>
TInfinitySolutionsPolicy til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::getInfSolPolicy ( ) const
inline

Return the "infinity of solutions" policy.

Definition at line 42 of file poly_solver.h.

◆ nsols()

template<typename TPrec, typename TInfinitySolutionsPolicy>
int til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::nsols ( ) const
inline

Return the number of solutions.

Definition at line 38 of file poly_solver.h.

◆ sols()

template<typename TPrec, typename TInfinitySolutionsPolicy>
const TPrec* til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::sols ( ) const
inline

Return an array containing the solutions.

Definition at line 40 of file poly_solver.h.

◆ solve() [1/2]

template<typename TPrec, typename TInfinitySolutionsPolicy>
void til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::solve ( TPrec  a,
TPrec  b 
)

solve first order polynomial equation [ a X + b = 0]

◆ solve() [2/2]

template<typename TPrec, typename TInfinitySolutionsPolicy>
void til::math::PolySolver_real< TPrec, TInfinitySolutionsPolicy >::solve ( TPrec  a,
TPrec  b,
TPrec  c 
)

solve 2nd order polynomial equation [ a X^2 + b X + C = 0]

Friends And Related Function Documentation

◆ policy::InfinitySolutions_None

template<typename TPrec, typename TInfinitySolutionsPolicy>
friend class policy::InfinitySolutions_None
friend

Definition at line 26 of file poly_solver.h.


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