Class poly_real_coeff (o2scl)¶
-
template<class fp_t = double, class cx_t = std::complex<fp_t>, class coeff_vec_t = std::vector<fp_t>, class root_vec_t = std::vector<cx_t>>
class poly_real_coeff : public o2scl::quadratic_real_coeff<double, std::complex<double>>, public o2scl::cubic_real_coeff<double, std::complex<double>>, public o2scl::quartic_real_coeff<double, std::complex<double>>¶ Solve a general polynomial with real coefficients and complex roots [abstract base].
Subclassed by o2scl::poly_real_coeff_gsl< fp_t, cx_t, coeff_vec_t, root_vec_t >
Public Types
-
typedef boost::numeric::ublas::vector<double> ubvector¶
-
typedef boost::numeric::ublas::matrix<double> ubmatrix¶
Public Functions
-
inline virtual ~poly_real_coeff()¶
-
virtual int solve_rc_arr(int n, const coeff_vec_t &co, root_vec_t &ro) = 0¶
Solve the n-th order polynomial.
The coefficients are stored in co[], with the leading coefficient as co[0] and the constant term as co[n]. The roots are returned in ro[0],…,ro[n-1].
-
inline virtual int polish_rc_arr(int n, const coeff_vec_t &co, root_vec_t &ro)¶
Polish the roots.
-
inline virtual int polish_fun(size_t nv, const ubvector &x, ubvector &y, const coeff_vec_t &co, size_t n)¶
Polish roots.
-
inline const char *type()¶
Return a string denoting the type (“poly_real_coeff”)
-
typedef boost::numeric::ublas::vector<double> ubvector¶