|
| | Quadratic () |
| |
| | Quadratic (real_type a, real_type b, real_type c) |
| |
| void | setup (real_type a, real_type b, real_type c) |
| |
| integer | num_roots () const |
| |
| integer | numRoots () const |
| | alias of num_roots
|
| |
| bool | complex_root () const |
| |
| bool | complexRoot () const |
| | alias of complex_root
|
| |
| bool | double_root () const |
| |
| bool | doubleRoot () const |
| | alias of double_root
|
| |
| integer | get_real_roots (real_type r[]) const |
| |
| integer | getRealRoots (real_type r[]) const |
| | alias of get_real_roots
|
| |
| integer | get_positive_roots (real_type r[]) const |
| |
| integer | getPositiveRoots (real_type r[]) const |
| | alias of get_positive_roots
|
| |
| integer | get_negative_roots (real_type r[]) const |
| |
| integer | getNegativeRoots (real_type r[]) const |
| | alias of get_negative_roots
|
| |
| integer | get_roots_in_range (real_type a, real_type b, real_type r[]) const |
| |
| integer | getRootsInRange (real_type a, real_type b, real_type r[]) const |
| | alias of get_roots_in_range
|
| |
| integer | get_roots_in_open_range (real_type a, real_type b, real_type r[]) const |
| |
| integer | getRootsInOpenRange (real_type a, real_type b, real_type r[]) const |
| | alias of get_roots_in_open_range
|
| |
| real_type | real_root0 () const |
| |
| real_type | real_root1 () const |
| |
| complex_type | root0 () const |
| |
| complex_type | root1 () const |
| |
| void | get_root0 (real_type &re, real_type &im) const |
| |
| void | getRoot0 (real_type &re, real_type &im) const |
| | alias of get_root0
|
| |
| void | get_root0 (complex_type &r) const |
| |
| void | getRoot0 (complex_type &r) const |
| | alias of get_root0
|
| |
| void | get_root1 (real_type &re, real_type &im) const |
| |
| void | getRoot1 (real_type &re, real_type &im) const |
| | alias of get_root1
|
| |
| void | get_root1 (complex_type &r) const |
| |
| void | getRoot1 (complex_type &r) const |
| | alias of get_root1
|
| |
| real_type | eval (real_type x) const |
| |
| complex_type | eval (complex_type x) const |
| |
| void | eval (real_type x, real_type &p, real_type &dp) const |
| |
| void | info (ostream_type &s) const |
| |
| bool | check (ostream_type &s) const |
| |
Quadratic polynomial class
Constructor
double a = 1;
double b = 2;
double c = 3;
Quadratic()
Definition PolynomialRoots.hh:206
void setup(real_type a, real_type b, real_type c)
Definition PolynomialRoots.hh:240
Get kind of solution
integer num_roots() const
Definition PolynomialRoots.hh:258
bool double_root() const
Definition PolynomialRoots.hh:274
bool complex_root() const
Definition PolynomialRoots.hh:266
Get real roots
double r_min = 0;
double r_max = 2;
double r[2];
int nroots;
nroots = p.getRealRoots( r );
nroots = p.getPositiveRoots( r );
nroots = p.getNegativeRoots( r );
nroots = p.getRootsInRange( r_min, r_max, r );
nroots = p.getRootsInOpenRange( r_min, r_max, r );
Get roots
double r0 = p.real_root0();
double r1 = p.real_root1();
double re, im;
p.getRoot0( re, im );
p.getRoot0( r );
p.getRoot1( re, im );
p.getRoot1( r );
std::complex< real_type > complex_type
complex type numbers
Definition PolynomialRoots-Utils.hh:50
Evaluate polynomial
{double or complex} v, x;
v = p.eval( x );
p.eval( x, p, dp );
Information
p.info( cout );
bool ok = p.check( cout );