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 \( a_3 x^3 + b_3 x^2 + c_3 x + d_3= 0 \) giving the three solutions \( x=x_1 \) , \( x=x_2 \) , and \( x=x_3 \) .
-
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 \( a_3 x^3 + b_3 x^2 + c_3 x + d_3= 0 \) giving the real solution \( x=x_1 \) and two complex solutions \( x=x_2 \) and \( x=x_3 \) .
-
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 \( a_3 x^3 + b_3 x^2 + c_3 x + d_3= 0 \) giving the three complex solutions \( x=x_1 \) , \( x=x_2 \) , and \( x=x_3 \) .
-
inline size_t test_complex_coeffs(fp_t &s1, fp_t &s2, fp_t &m1, fp_t &m2, size_t n = 9)¶
Test \( 2 n^4 \) cubics with complex coefficients.
-
inline const char *type()¶
Return a string denoting the type (“cubic_complex”)
-
inline virtual ~cubic_complex()¶