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
16
#ifndef MPS_NROOTS_POLYNOMIAL_H_
17
#define MPS_NROOTS_POLYNOMIAL_H_
18
19
#ifdef __cplusplus
20
21
#include <
mps/mps.h
>
22
23
namespace
mps {
32
class
NRootsPolynomial
:
Polynomial
{
33
public
:
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::NRootsPolynomial
This class is a brief example of how one could implement a custom polynomial type using C++ classes.
Definition:
nroots-polynomial.h:32
mps::NRootsPolynomial::eval
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
mps::Polynomial
Definition:
polynomial.h:274
mps.h
Header file for libmps.
mps_approximation
Definition:
approximation.h:24
mps_context
this struct holds the state of the mps computation
Definition:
context.h:55
include
mps
nroots-polynomial.h
Generated on Mon Nov 28 2022 00:00:00 for MPSolve by
1.9.5