MPSolve 3.2.1
|
This class is a brief example of how one could implement a custom polynomial type using C++ classes. More...
#include <nroots-polynomial.h>
Public Member Functions | |
NRootsPolynomial (mps_context *ctx, int n) | |
Create the polynomial ![]() | |
mps_boolean | eval (mps_context *ctx, cplx_t x, cplx_t value, double *error) |
Evaluate the polynomial at a point. More... | |
mps_boolean | eval (mps_context *ctx, cdpe_t x, cdpe_t value, rdpe_t error) |
Evaluate the polynomial at a point. More... | |
mps_boolean | eval (mps_context *ctx, mpc_t x, mpc_t value, rdpe_t error) |
Evaluate the polynomial at a point. More... | |
void | newton (mps_context *ctx, mps_approximation *a, cplx_t x) |
void | newton (mps_context *ctx, mps_approximation *a, cdpe_t x) |
void | newton (mps_context *ctx, mps_approximation *a, mpc_t x, long int wp) |
This class is a brief example of how one could implement a custom polynomial type using C++ classes.
It's not really meant to be of any practical use or to be efficient. The main purpose of its implementation is to be straightforward so anyone can use it a a "tutorial" for creating custom polynomial types.
|
explicit |
Create the polynomial
n | The degree of the polynomial that should be created. |
|
virtual |
Evaluate the polynomial at a point.
This method should be overloaded by subclasses of Polynomial
in order to provide the necessary methods to MPSolve.
x | The point where the Polynomial should be evaluted. |
value | The storage where the result of the evaluation will be stored. |
error | An upper bound to the error that has been computed in this operation. |
Implements mps::Polynomial.
|
virtual |
Evaluate the polynomial at a point.
This method should be overloaded by subclasses of Polynomial
in order to provide the necessary methods to MPSolve.
x | The point where the Polynomial should be evaluted. |
value | The storage where the result of the evaluation will be stored. |
error | An upper bound to the error that has been computed in this operation. |
Implements mps::Polynomial.
|
virtual |
Evaluate the polynomial at a point.
This method should be overloaded by subclasses of Polynomial
in order to provide the necessary methods to MPSolve.
x | The point where the Polynomial should be evaluted. |
value | The storage where the result of the evaluation will be stored. |
error | An upper bound to the error that has been computed in this operation. |
Implements mps::Polynomial.
|
virtual |
Implements mps::Polynomial.
|
virtual |
Implements mps::Polynomial.
|
virtual |
Implements mps::Polynomial.