| 1 |
/* |
| 2 |
* This file is part of MPSolve 3.2.2 |
| 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 <[email protected]> |
| 9 |
*/ |
| 10 |
|
| 11 |
/** |
| 12 |
* @file |
| 13 |
* @brief |
| 14 |
*/ |
| 15 |
|
| 16 |
#ifndef MPS_STARTING_CONFIGURATION_H_ |
| 17 |
#define MPS_STARTING_CONFIGURATION_H_ |
| 18 |
|
| 19 |
MPS_BEGIN_DECLS |
| 20 |
|
| 21 |
#define MPS_STARTING_CONFIGURATION_INIT { \ |
| 22 |
.n_radii = 0, \ |
| 23 |
.fradii = NULL, \ |
| 24 |
.dradii = NULL, \ |
| 25 |
.partitioning = NULL \ |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* @brief This struct holds the information about the starting disposal of the |
| 30 |
* approximations that has been obtained by the computation of the Newton polygon |
| 31 |
* of the polynomial. |
| 32 |
*/ |
| 33 |
struct mps_starting_configuration { |
| 34 |
/** |
| 35 |
* @brief The number of circles on which the approximations should be |
| 36 |
* put. |
| 37 |
*/ |
| 38 |
int n_radii; |
| 39 |
|
| 40 |
/** |
| 41 |
* @brief An array of integers that holds the indexes of the approximations that |
| 42 |
* should be put on the different circles. |
| 43 |
* |
| 44 |
* Precisely, this array represent a partition of \f$[0, n]\f$. |
| 45 |
*/ |
| 46 |
int * partitioning; |
| 47 |
|
| 48 |
/** |
| 49 |
* @brief An array containing the radius of the circles where the roots should be |
| 50 |
* placed. |
| 51 |
*/ |
| 52 |
double * fradii; |
| 53 |
|
| 54 |
/** |
| 55 |
* @brief The DPE version of fradii. |
| 56 |
*/ |
| 57 |
rdpe_t * dradii; |
| 58 |
}; |
| 59 |
|
| 60 |
typedef struct mps_starting_configuration mps_starting_configuration; |
| 61 |
|
| 62 |
/** |
| 63 |
* @brief Clear all the storage that has been allocated inside a starting |
| 64 |
* configuration. |
| 65 |
* |
| 66 |
* @param ctx The current mps_context. |
| 67 |
* @param c The mps_starting_configuration that should be cleared. |
| 68 |
*/ |
| 69 |
void mps_starting_configuration_clear (mps_context * ctx, mps_starting_configuration * c); |
| 70 |
|
| 71 |
mps_starting_configuration mps_fcompute_starting_radii (mps_context * s, int n, |
| 72 |
mps_cluster_item * cluster_item, |
| 73 |
double clust_rad, double g, rdpe_t eps, |
| 74 |
double fap[]); |
| 75 |
|
| 76 |
|
| 77 |
MPS_END_DECLS |
| 78 |
|
| 79 |
#endif /* MPS_STARTING_CONFIGURATION_H_ */ |