#include <Polynomial.h>
◆ Polynomial() [1/3]
template<typename T >
| Laguerre::Polynomial< T >::Polynomial |
( |
std::vector< T > | _coeffs, |
|
|
std::vector< std::complex< T > > | _roots ) |
|
inline |
Create polynomial object from given vectors of coefficients and roots.
- Parameters
-
| _coeffs | Vector of coefficients. |
| _roots | Vector of roots. |
◆ Polynomial() [2/3]
Create polynomial object from given vector of coefficients.
- Parameters
-
| args | Vector of coefficients. |
◆ Polynomial() [3/3]
template<typename T >
template<typename... Args>
Create polynomial object from given coefficients.
- Parameters
-
◆ degree()
Get polynomials degree.
- Returns
- Degree of the polynomial.
◆ diff()
Calculates the derivative of a Polynomial object.
This function calculates the derivative of a given degree of the Polynomial object. The default degree of the derivative is 1, which means it calculates the first derivative if no degree is specified.
- Template Parameters
-
- Parameters
-
| deg | The degree of the derivative. Default is 1. |
- Returns
- A vector of coefficients representing the derivative of the Polynomial.
◆ divide()
Divides one polynomial by another.
This function performs polynomial division. Given a divisor and a dividend (the instance calling the function), it calculates the quotient and the remainder of the division.
- Parameters
-
| divisor | The polynomial to divide by. |
| quotient | The result of the division. |
| remainder | The remainder after division. |
◆ operator*()
◆ operator*=()
◆ operator+()
◆ operator-()
◆ operator/()
◆ operator=()
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ print()
◆ setCoeffs() [1/2]
template<typename T >
template<typename... Args>
Set coefficients for this polynomial.
- Parameters
-
◆ setCoeffs() [2/2]
Set coefficients for this polynomial.
- Parameters
-
| args | Vector of coefficients. |
◆ setRoots() [1/2]
template<typename T >
template<typename... Args>
Set roots for this polynomial.
- Parameters
-
◆ setRoots() [2/2]
Set roots for this polynomial.
- Parameters
-
◆ setSolver()
Set solver for this polynomial.
- Parameters
-
| solver | Pointer to a Solver object. |
◆ solve()
template<typename T >
| void Laguerre::Polynomial< T >::solve |
( |
std::vector< std::complex< T > > & | roots, |
|
|
std::vector< int > & | conv, |
|
|
int | maxiter = 80 ) |
|
inline |
Find the roots of this polynomial.
- Parameters
-
| roots | Vector to store the roots. |
| conv | Vector to store convergence status of each root. |
| itmax | Maximum number of iterations. |
◆ coeffs
◆ roots
◆ Solver
The documentation for this class was generated from the following file: