Class cubic_complex (o2scl)¶
-
template<class fp_t = double, class cx_t = std::complex<fp_t>>
class cubic_complex : public o2scl::cubic_real_coeff<double, std::complex<double>>¶ Solve a cubic polynomial with complex coefficients and complex roots [abstract base].
Subclassed by o2scl::cubic_complex_std< double, std::complex< double > >, o2scl::cubic_complex_std< fp_t, cx_t >, o2scl::poly_complex< fp_t, cx_t, coeff_vec_t, root_vec_t >
Public Functions
-
inline virtual ~cubic_complex()¶
-
inline virtual int solve_r(const fp_t a3, const fp_t b3, const fp_t c3, const fp_t d3, fp_t &x1, fp_t &x2, fp_t &x3)¶
Solves the polynomial
giving the three solutions , , and .
-
inline virtual int solve_rc(const fp_t a3, const fp_t b3, const fp_t c3, const fp_t d3, fp_t &x1, cx_t &x2, cx_t &x3)¶
Solves the polynomial
giving the real solution and two complex solutions and .
-
virtual int solve_c(const cx_t a3, const cx_t b3, const cx_t c3, const cx_t d3, cx_t &x1, cx_t &x2, cx_t &x3) = 0¶
Solves the complex polynomial
giving the three complex solutions , , and .
-
inline size_t test_complex_coeffs(fp_t &s1, fp_t &s2, fp_t &m1, fp_t &m2, size_t n = 9)¶
Test
cubics with complex coefficients.
-
inline const char *type()¶
Return a string denoting the type (“cubic_complex”)
-
inline virtual ~cubic_complex()¶