MPSolve 3.2.1
Loading...
Searching...
No Matches
secular-regeneration.h File Reference

Go to the source code of this file.

Functions

MPS_BEGIN_DECLS mps_boolean mps_secular_ga_regenerate_coefficients_mp (mps_context *s, cdpe_t *old_b, mpc_t *old_mb)
 Regenerate the coefficients $a_i$ based on the $b_i$. More...
 

Function Documentation

◆ mps_secular_ga_regenerate_coefficients_mp()

MPS_BEGIN_DECLS mps_boolean mps_secular_ga_regenerate_coefficients_mp ( mps_context s,
cdpe_t *  old_b,
mpc_t *  old_mb 
)

Regenerate the coefficients $a_i$ based on the $b_i$.

The coefficients used are the one in multiprecision, so if floating point coefficient regeneration is desired, one must take care to copy the floating point coefficient in the multiprecision before calling this function, and to copy them back after the computation.

A useful function that does all the things above, doing the rigth thing based on s->lastphase, where s is a pointer to the mps_context is mps_secular_ga_regenerate_coefficients() and is the one that should be used

Parameters
sThe mps_context of the computation.
old_bOld $b_i$ coefficients from which we are regenerating from. These are used to adjust the a_i for already approximated roots.
old_mbOld $b_i$ in the multiprecision version. These are used only in the case where s->lastphase == mp_phase to determine if the roots have changed. Otherwise it must be set to NULL.