MPSolve 3.2.1
Loading...
Searching...
No Matches
starting.h File Reference

Selection of starting points and shifting of the polynomials to zoom in the clusters. More...

Go to the source code of this file.

Functions

MPS_BEGIN_DECLS void mps_fstart (mps_context *s, int n, mps_cluster_item *cluster, double clust_rad, double g, rdpe_t eps_out, double fap[])
 Compute new starting approximations to the roots of the polynomial $p(x)$ having coefficients of modulus apoly. More...
 
void mps_dstart (mps_context *s, int n, mps_cluster_item *cluster, rdpe_t clust_rad, rdpe_t g, rdpe_t eps_out, rdpe_t dap[])
 Compute new starting approximations to the roots of the polynomial $p(x)$ having coefficients of modulus apoly, by means of the Rouche'-based criterion of Bini (Numer. Algo. 1996). More...
 
void mps_mstart (mps_context *s, int n, mps_cluster_item *cluster, rdpe_t clust_rad, rdpe_t g, rdpe_t dap[], mpc_t gg)
 Multiprecision version of mps_fstart() More...
 
void mps_frestart (mps_context *s)
 This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (floating point version). More...
 
void mps_drestart (mps_context *s)
 This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (DPE version). More...
 
void mps_mrestart (mps_context *s)
 This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (MP version). More...
 
void mps_fshift (mps_context *s, int m, mps_cluster_item *cluster, double clust_rad, cplx_t g, rdpe_t eps)
 This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the floating point version of this function. More...
 
void mps_dshift (mps_context *s, int m, mps_cluster_item *cluster, rdpe_t clust_rad, cdpe_t g, rdpe_t eps)
 This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the DPE version of this function. More...
 
void mps_mshift (mps_context *s, int m, mps_cluster_item *cluster, rdpe_t clust_rad, mpc_t g)
 This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the MP version of this function. More...
 
void mps_recursive_fstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}. More...
 
void mps_recursive_dstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}. More...
 
void mps_recursive_mstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}. More...
 
void mps_file_fstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr. More...
 
void mps_file_dstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr. More...
 
void mps_file_mstart (mps_context *ctx, mps_polynomial *poly, mps_approximation **approximations)
 Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr. More...
 

Detailed Description

Selection of starting points and shifting of the polynomials to zoom in the clusters.

Function Documentation

◆ mps_drestart()

void mps_drestart ( mps_context s)

This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (DPE version).

Parameters
sA pointer to the current mps_context.

Shift in g is perfomed if the approximation is included in the search set or its inclusion status has not been determined yet.

To compute g, first compute the weighted mean (super center sc) of the approximations in the cluster, where the weight are the radii, then compute the radius (super radius sr) of the disk centered in the super center containing all the disks of the cluster. Apply few steps of Newton's iteration to the (m-1)-st derivative of the polynomial starting from the super center and obtain the point g where to shift the variable. If g is outside the super disk of center sc and radius sr output a warning message.

◆ mps_dshift()

void mps_dshift ( mps_context s,
int  m,
mps_cluster_item cluster_item,
rdpe_t  clust_rad,
cdpe_t  g,
rdpe_t  eps 
)

This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the DPE version of this function.

Parameters
sThe current mps_context.
mThe size of the cluster.
mps_cluster_itemA pointer to the cluster that shall be shifted.
clust_radA bound for the radius of the cluster.
gThe gravity center of the cluster. @parma eps The current value of epsilon that should be used as a treshold.

Then it computes the new starting approximations for the cluster selected by applying mps_fstart() and by updating the approximations.

◆ mps_dstart()

void mps_dstart ( mps_context s,
int  n,
mps_cluster_item cluster_item,
rdpe_t  clust_rad,
rdpe_t  g,
rdpe_t  eps,
rdpe_t  dap[] 
)

Compute new starting approximations to the roots of the polynomial $p(x)$ having coefficients of modulus apoly, by means of the Rouche'-based criterion of Bini (Numer. Algo. 1996).

The program can compute all the approximations (if $n$ is the degree of $p(x)$) or it may compute the approximations of the cluster of the cluster_item. The status vector is changed into 'o' for the components that belong to a cluster with relative radius less than eps. The status vector is changed into 'f' for the components that cannot be represented as >dpe.

Parameters
smps_context struct pointer.
nnumber of root in the cluster to consider
cluster_itemThe item of the mps_clusterization containing the cluster that we are analyzing.
clust_radradius of the cluster.
gnew center in which the the polynomial will be shifted.
epsmaximum radius considered small enough to be negligible.
dap[]moduli of the coefficients as dpe numbers.

◆ mps_file_dstart()

void mps_file_dstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr.

Parameters
ctxThe current mps_context.
polyThe polynomial for which the approxmimations should be selected.
approximationsThe approximations that will be set according to the data found in the input file.

◆ mps_file_fstart()

void mps_file_fstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr.

Parameters
ctxThe current mps_context.
polyThe polynomial for which the approxmimations should be selected.
approximationsThe approximations that will be set according to the data found in the input file.

◆ mps_file_mstart()

void mps_file_mstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select the starting points for the polynomial by loading the approximations loaded in the file that has been opened in ctx->rtstr.

Parameters
ctxThe current mps_context.
polyThe polynomial for which the approxmimations should be selected.
approximationsThe approximations that will be set according to the data found in the input file.

◆ mps_frestart()

void mps_frestart ( mps_context s)

This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (floating point version).

Parameters
sA pointer to the current mps_context.

Shift in g is perfomed if the approximation is included in the search set or its inclusion status has not been determined yet.

To compute g, first compute the weighted mean (super center sc) of the approximations in the cluster, where the weight are the radii, then compute the radius (super radius sr) of the disk centered in the super center containing all the disks of the cluster. Apply few steps of Newton's iteration to the (m-1)-st derivative of the polynomial starting from the super center and obtain the point g where to shift the variable. If g is outside the super disk of center sc and radius sr output a warning message.

◆ mps_fshift()

void mps_fshift ( mps_context s,
int  m,
mps_cluster_item cluster_item,
double  clust_rad,
cplx_t  g,
rdpe_t  eps 
)

This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the floating point version of this function.

Parameters
sThe current mps_context.
mThe size of the cluster.
mps_cluster_itemA pointer to the cluster that shall be shifted.
clust_radA bound for the radius of the cluster.
gThe gravity center of the cluster. @parma eps The current value of epsilon that should be used as a treshold.

Then it computes the new starting approximations for the cluster selected by applying mps_fstart() and by updating the approximations.

◆ mps_fstart()

MPS_BEGIN_DECLS void mps_fstart ( mps_context s,
int  n,
mps_cluster_item cluster_item,
double  clust_rad,
double  g,
rdpe_t  eps,
double  fap[] 
)

Compute new starting approximations to the roots of the polynomial $p(x)$ having coefficients of modulus apoly.

Computations is done by means of the Rouche'-based criterion of Bini (Numer. Algo. 1996). The program can compute all the approximations (if $n$ is the degree of $p(x)$) or it may compute the approximations of the cluster in the cluster_item. The status vector is changed into 'o' for the components that belong to a cluster with relative radius less than eps. The status vector is changed into 'x' for the components that cannot be represented as double.

Parameters
sThe mps_context associated with the current computation.
nnumber of roots in the cluster.
cluster_itemThe element of the mps_clusterization of which we are computing the starting points, or NULL if we are computing the starting points for all the approximations.
clust_radradius of cluster.
ggravity center of the cluster.
epsa double that represent the maximum value of relative radius (with respect to g) of roots whose status must be set to o.
faparray of moduli of the coefficients as double.
See also
status

◆ mps_mrestart()

void mps_mrestart ( mps_context s)

This function scans the existing clusters and selects the ones where shift in the gravity center must be done. Then computes the gravity center g, performs the shift of the variable and compute new starting approximations in the cluster (MP version).

Parameters
sA pointer to the current mps_context.

Shift in g is perfomed if the approximation is included in the search set or its inclusion status has not been determined yet.

To compute g, first compute the weighted mean (super center sc) of the approximations in the cluster, where the weight are the radii, then compute the radius (super radius sr) of the disk centered in the super center containing all the disks of the cluster. Apply few steps of Newton's iteration to the (m-1)-st derivative of the polynomial starting from the super center and obtain the point g where to shift the variable. If g is outside the super disk of center sc and radius sr output a warning message.

◆ mps_mshift()

void mps_mshift ( mps_context s,
int  m,
mps_cluster_item cluster_item,
rdpe_t  clust_rad,
mpc_t  g 
)

This routine computes the first $m+1$ coefficients of the shifted polynomial $p(x+g)$, by performing $m+1$ Horner divisions. This if the MP version of this function.

Parameters
sThe current mps_context.
mThe size of the cluster.
mps_cluster_itemA pointer to the cluster that shall be shifted.
clust_radA bound for the radius of the cluster.
gThe gravity center of the cluster. @parma eps The current value of epsilon that should be used as a treshold.

Then it computes the new starting approximations for the cluster selected by applying mps_fstart() and by updating the approximations.

◆ mps_mstart()

void mps_mstart ( mps_context s,
int  n,
mps_cluster_item cluster_item,
rdpe_t  clust_rad,
rdpe_t  g,
rdpe_t  dap[],
mpc_t  gg 
)

Multiprecision version of mps_fstart()

See also
mps_fstart()

◆ mps_recursive_dstart()

void mps_recursive_dstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}.

Parameters
ctxThe current mps_context.
polyThe polynomial whose roots should be approximated.

◆ mps_recursive_fstart()

void mps_recursive_fstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}.

Parameters
ctxThe current mps_context.
polyThe polynomial whose roots should be approximated.

◆ mps_recursive_mstart()

void mps_recursive_mstart ( mps_context ctx,
mps_polynomial poly,
mps_approximation **  approximations 
)

Select appropriate starting point for the approximation of the roots of the given polynomial by applying a divide-and-conquer strategy described in {TODO: Reference missing}.

Parameters
ctxThe current mps_context.
polyThe polynomial whose roots should be approximated.