Class poly_real_coeff_gsl (o2scl)¶
-
template<class fp_t = double, class cx_t = std::complex<fp_t>, class coeff_vec_t = std::vector<double>, class root_vec_t = std::vector<std::complex<double>>>
class poly_real_coeff_gsl : public o2scl::poly_real_coeff<double, std::complex<double>>¶ Solve a general polynomial with real coefficients (GSL)
Public Functions
-
inline poly_real_coeff_gsl()¶
-
inline virtual ~poly_real_coeff_gsl()¶
-
inline virtual int solve_rc_arr(int n, const coeff_vec_t &co, root_vec_t &ro)¶
Solve a generic polynomial given
n+1
coefficients.Note
In order to be consistent with the other solve_rc() functions, the ordering of the coefficients is reversed with respect to gsl_poly_complex_solve(). The leading coefficient is stored in
co[0]
and the constant term is stored inco[n]
.
-
inline virtual int solve_rc(const fp_t a2, const fp_t b2, const fp_t c2, cx_t &r1, cx_t &r2)¶
Solve a quadratic polynomial with real coefficients.
-
inline virtual int solve_rc(const fp_t a3, const fp_t b3, const fp_t c3, const fp_t d3, fp_t &r1, cx_t &r2, cx_t &r3)¶
Solve a cubic polynomial with real coefficients.
-
inline virtual int solve_rc(const fp_t a4, const fp_t b4, const fp_t c4, const fp_t d4, const fp_t e4, cx_t &r1, cx_t &r2, cx_t &r3, cx_t &r4)¶
Solve a quartic polynomial with real coefficients.
-
inline const char *type()¶
Return a string denoting the type (“poly_real_coeff_gsl”)
Public Members
-
bool check_refine¶
Check each root and automatically refine.
-
inline poly_real_coeff_gsl()¶