# FoundationClasses
TKMath
math

# math_DirectPolynomialRoots Class Reference

This class implements the calculation of all the real roots of a real
polynomial of degree <= 4 using a direct method. Once found,
the roots are polished using the Newton method.
.

`#include <math_DirectPolynomialRoots.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | math_DirectPolynomialRoots (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D, const Standard_Real E)
| computes all the real roots of the polynomial Ax4 + Bx3 + Cx2 + Dx + E using a direct method.
Standard_EXPORT | math_DirectPolynomialRoots (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D)
| computes all the real roots of the polynomial Ax3 + Bx2 + Cx + D using a direct method.
Standard_EXPORT | math_DirectPolynomialRoots (const Standard_Real A, const Standard_Real B, const Standard_Real C)
| computes all the real roots of the polynomial Ax2 + Bx + C using a direct method.
Standard_EXPORT | math_DirectPolynomialRoots (const Standard_Real A, const Standard_Real B)
| computes the real root of the polynomial Ax + B.
Standard_Boolean | IsDone () const
| Returns true if the computations are successful, otherwise returns false. .
Standard_Boolean | InfiniteRoots () const
| Returns true if there is an infinity of roots, otherwise returns false. .
Standard_Integer | NbSolutions () const
| returns the number of solutions. An exception is raised if there are an infinity of roots.
Standard_Real | Value (const Standard_Integer Nieme) const
| returns the value of the Nieme root. An exception is raised if there are an infinity of roots. Exception RangeError is raised if Nieme is < 1 or Nieme > NbSolutions.
Standard_EXPORT void | Dump (Standard_OStream &o) const
| Prints on the stream o information on the current state of the object. Is used to redefine the operator <<. .

## Protected Member Functions

Standard_EXPORT void | Solve (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D, const Standard_Real E)
Standard_EXPORT void | Solve (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D)
Standard_EXPORT void | Solve (const Standard_Real A, const Standard_Real B, const Standard_Real C)
Standard_EXPORT void | Solve (const Standard_Real A, const Standard_Real B)

## Private Attributes

Standard_Boolean | Done
Standard_Boolean | InfiniteStatus
Standard_Integer | NbSol
Standard_Real | TheRoots [4]

## Constructor & Destructor Documentation

Standard_EXPORT math_DirectPolynomialRoots::math_DirectPolynomialRoots | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C,
|  | const Standard_Real | D,
|  | const Standard_Real | E
| ) |

Standard_EXPORT math_DirectPolynomialRoots::math_DirectPolynomialRoots | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C,
|  | const Standard_Real | D
| ) |

Standard_EXPORT math_DirectPolynomialRoots::math_DirectPolynomialRoots | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C
| ) |

Standard_EXPORT math_DirectPolynomialRoots::math_DirectPolynomialRoots | ( | const Standard_Real | A,
|  | const Standard_Real | B
| ) |

## Member Function Documentation

Standard_EXPORT void math_DirectPolynomialRoots::Dump | ( | Standard_OStream & | o | ) | const

Standard_Boolean math_DirectPolynomialRoots::InfiniteRoots | ( |  | ) | const`[inline]`

Standard_Boolean math_DirectPolynomialRoots::IsDone | ( |  | ) | const`[inline]`

Standard_Integer math_DirectPolynomialRoots::NbSolutions | ( |  | ) | const`[inline]`

void math_DirectPolynomialRoots::operator delete | ( | void * | anAddress | ) | `[inline]`

void* math_DirectPolynomialRoots::operator new | ( | size_t | size | ) | `[inline]`

void* math_DirectPolynomialRoots::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT void math_DirectPolynomialRoots::Solve | ( | const Standard_Real | A,
|  | const Standard_Real | B
| ) | `[protected]`

Standard_EXPORT void math_DirectPolynomialRoots::Solve | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C
| ) | `[protected]`

Standard_EXPORT void math_DirectPolynomialRoots::Solve | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C,
|  | const Standard_Real | D
| ) | `[protected]`

Standard_EXPORT void math_DirectPolynomialRoots::Solve | ( | const Standard_Real | A,
|  | const Standard_Real | B,
|  | const Standard_Real | C,
|  | const Standard_Real | D,
|  | const Standard_Real | E
| ) | `[protected]`

Standard_Real math_DirectPolynomialRoots::Value | ( | const Standard_Integer | Nieme | ) | const`[inline]`

## Field Documentation

Standard_Boolean math_DirectPolynomialRoots::Done `[private]`

Standard_Boolean math_DirectPolynomialRoots::InfiniteStatus `[private]`

Standard_Integer math_DirectPolynomialRoots::NbSol `[private]`

Standard_Real math_DirectPolynomialRoots::TheRoots[4]`[private]`

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

- math_DirectPolynomialRoots.hxx
- math_DirectPolynomialRoots.lxx