MPSolve 3.2.1
Loading...
Searching...
No Matches
nroots-polynomial.h
Go to the documentation of this file.
1/*
2 * This file is part of MPSolve 3.2.1
3 *
4 * Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
5 * License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
6 *
7 * Authors:
8 * Leonardo Robol <leonardo.robol@unipi.it>
9 */
10
15
16#ifndef MPS_NROOTS_POLYNOMIAL_H_
17#define MPS_NROOTS_POLYNOMIAL_H_
18
19#ifdef __cplusplus
20
21#include <mps/mps.h>
22
23namespace mps {
33public:
39 explicit NRootsPolynomial (mps_context * ctx, int n);
40
41 mps_boolean eval (mps_context * ctx, cplx_t x, cplx_t value, double * error);
42 mps_boolean eval (mps_context * ctx, cdpe_t x, cdpe_t value, rdpe_t error);
43 mps_boolean eval (mps_context * ctx, mpc_t x, mpc_t value, rdpe_t error);
44
45 void newton (mps_context * ctx, mps_approximation * a, cplx_t x);
46 void newton (mps_context * ctx, mps_approximation * a, cdpe_t x);
47 void newton (mps_context * ctx, mps_approximation * a, mpc_t x, long int wp);
48 };
49}
50
51#endif
52
53
54#endif /* MPS_NROOTS_POLYNOMIAL_H_ */
55
mps_boolean eval(mps_context *ctx, cplx_t x, cplx_t value, double *error)
Evaluate the polynomial at a point.
Definition nroots-polynomial.cpp:23
NRootsPolynomial(mps_context *ctx, int n)
Create the polynomial .
Definition nroots-polynomial.cpp:15
Polynomial(mps_context *ctx, const char *type_name="mps_polynomial")
This constructor has the main role of adjusting the fake vtable in the C struct to reflect the actual...
Definition polynomialxx.cpp:55
Header file for libmps.
Definition approximation.h:24
this struct holds the state of the mps computation
Definition context.h:55