Class quadratic_complex (o2scl)¶
-
template<class fp_t = double, class cx_t = std::complex<fp_t>>
class quadratic_complex : public o2scl::quadratic_real_coeff<double, std::complex<double>>¶ Solve a quadratic polynomial with complex coefficients and complex roots [abstract base].
Subclassed by o2scl::quadratic_complex_std< double, std::complex< double > >, o2scl::poly_complex< fp_t, cx_t, coeff_vec_t, root_vec_t >, o2scl::quadratic_complex_std< fp_t, cx_t >
Public Functions
-
inline virtual ~quadratic_complex()¶
-
inline virtual int solve_r(const fp_t a2, const fp_t b2, const fp_t c2, fp_t &x1, fp_t &x2)¶
Solves the polynomial \( a_2 x^2 + b_2 x + c_2 = 0 \) giving the two solutions \( x=x_1 \) and \( x=x_2 \) .
-
inline virtual int solve_rc(const fp_t a2, const fp_t b2, const fp_t c2, cx_t &x1, cx_t &x2)¶
Solves the polynomial \( a_2 x^2 + b_2 x + c_2 = 0 \) giving the two complex solutions \( x=x_1 \) and \( x=x_2 \).
-
virtual int solve_c(const cx_t a2, const cx_t b2, const cx_t c2, cx_t &x1, cx_t &x2) = 0¶
Solves the complex polynomial \( a_2 x^2 + b_2 x + c_2 = 0 \) giving the two complex solutions \( x=x_1 \) and \( x=x_2 \).
-
inline size_t test_complex_coeffs(fp_t &s1, fp_t &s2, fp_t &m1, fp_t &m2, size_t n = 10)¶
Test \( n^6 \) quadratics with complex roots.
-
inline size_t test_complex_roots(fp_t &s1, fp_t &s2, fp_t &m1, fp_t &m2, size_t n = 20)¶
Test \( n^4 \) quadratics with complex roots.
-
inline const char *type()¶
Return a string denoting the type (“quadratic_complex”)
-
inline virtual ~quadratic_complex()¶