MPSolve  3.2.1
monomial-matrix-poly.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 
11 #ifndef MPS_MONOMIAL_MATRIX_POLY_H_
12 #define MPS_MONOMIAL_MATRIX_POLY_H_
13 
20 #include <mps/polynomial.h>
21 
22 #define MPS_MONOMIAL_MATRIX_POLY(t) (MPS_POLYNOMIAL_CAST (mps_monomial_matrix_poly, t))
23 #define MPS_IS_MONOMIAL_MATRIX_POLY(t) \
24  (mps_polynomial_check_type (t, "mps_monomial_matrix_poly"))
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 #define MPS_MONOMIAL_MATRIX_POLY_HESSENBERG 0x0001
32 
33 #ifdef _MPS_PRIVATE
34 
45 
56  mps_boolean monic;
57 
62  int m;
63 
69  int degree;
70 
77  cplx_t * P;
78 
82  mpc_t * mP;
83 
91  mpq_t * mpqPr;
92 
100  mpq_t * mpqPi;
101 
109  int flags;
110 };
111 
112 
113 #endif /* _MPS_PRIVATE */
114 
115 /* From here on you will find declaration of the public method
116  available for the matrix polynomials */
117 
131  int degree,
132  int m,
133  mps_boolean monic);
142  mps_polynomial * poly);
143 
152  mps_monomial_matrix_poly * mpoly,
153  int flag);
154 
163  mps_monomial_matrix_poly * mpoly,
164  int flag);
165 
177  int i,
178  cplx_t * matrix);
179 
194  int i,
195  mpq_t * matrix_r,
196  mpq_t * matrix_i);
197 
210  mps_polynomial * poly,
211  mpc_t x,
212  mpc_t value,
213  rdpe_t error);
214 
227 long int
229  mps_polynomial * p,
230  long int wp);
231 
232 #ifdef __cplusplus
233 }
234 #endif
235 
236 
237 #endif /* __MPS_MONOMIAL_MATRIX_POLY_H */
void mps_monomial_matrix_poly_set_coefficient_d(mps_context *ctx, mps_monomial_matrix_poly *mpoly, int i, cplx_t *matrix)
Set the coefficient of degree i of the matrix polynomial.
Definition: monomial-matrix-poly.c:86
void mps_monomial_matrix_poly_clear_flags(mps_context *ctx, mps_monomial_matrix_poly *mpoly, int flag)
Clear some flags (properties) of this matrix polynomial.
Definition: monomial-matrix-poly.c:77
mps_monomial_matrix_poly * mps_monomial_matrix_poly_new(mps_context *ctx, int degree, int m, mps_boolean monic)
Create a new matrix polynomial of the given degree.
Definition: monomial-matrix-poly.c:15
void mps_monomial_matrix_poly_free(mps_context *ctx, mps_polynomial *poly)
Free a matrix polynomial.
Definition: monomial-matrix-poly.c:51
void mps_monomial_matrix_poly_set_coefficient_q(mps_context *ctx, mps_monomial_matrix_poly *mpoly, int i, mpq_t *matrix_r, mpq_t *matrix_i)
Set the coefficient of degree i of the matrix polynomial.
Definition: monomial-matrix-poly.c:127
mps_boolean mps_monomial_matrix_poly_meval(mps_context *ctx, mps_polynomial *poly, mpc_t x, mpc_t value, rdpe_t error)
Evaluate a matrix polynomial at a point, in the sense of evaluating .
Definition: monomial-matrix-poly.c:163
long int mps_monomial_matrix_poly_raise_data(mps_context *ctx, mps_polynomial *p, long int wp)
Raise the working precision of this monomial matrix polynomal to the required numnber of bits.
Definition: monomial-matrix-poly.c:187
void mps_monomial_matrix_poly_add_flags(mps_context *ctx, mps_monomial_matrix_poly *mpoly, int flag)
Add some flags (some properties) to this matrix polynomial.
Definition: monomial-matrix-poly.c:69
this struct holds the state of the mps computation
Definition: context.h:55
This is the struct that holds all the data of the matrix polynomial.
Definition: monomial-matrix-poly.h:39
cplx_t * P
The double version of the polynomial coefficients.
Definition: monomial-matrix-poly.h:77
mpq_t * mpqPi
The rational version of the polynomial coefficients. This is used only if the structure of the monomi...
Definition: monomial-matrix-poly.h:100
mpc_t * mP
The multiprecision version of the polynomial coefficients.
Definition: monomial-matrix-poly.h:82
int flags
Additional properties of this polynomial. Examples are: MPS_MONOMIAL_MATRIX_POLY_HESSENBERG,...
Definition: monomial-matrix-poly.h:109
mps_polynomial methods
Implementation of the overloaded methods for the matrix polynomial.
Definition: monomial-matrix-poly.h:44
int degree
Degree of the matrix polynomial. Please note that this values if different from the degree value in t...
Definition: monomial-matrix-poly.h:69
int m
The size of the matrices that compose the matrix polynomial.
Definition: monomial-matrix-poly.h:62
mps_boolean monic
If this flag is set to true then the higher degree term of the polynomial is the identity matrix and ...
Definition: monomial-matrix-poly.h:56
mpq_t * mpqPr
The rational version of the polynomial coefficients. This is used only if the structure of the monomi...
Definition: monomial-matrix-poly.h:91
Struct that represents an abstract polynomial. All the other real polynomial implementations (such as...
Definition: polynomial.h:111