|
Rosetta
|
#include <polynomial.hh>

Public Member Functions | |
| Polynomial_1d (std::string const &polynomial_name, Real const xmin, Real const xmax, Real const min_val, Real const max_val, Real const root1, Real const root2, Size degree, utility::vector1< Real > const &coefficients) | |
| ctor More... | |
| Polynomial_1d (Polynomial_1d const &src) | |
| ~Polynomial_1d () override | |
| void | check_invariants () const |
| std::string const & | name () const |
| Real | xmin () const |
| Real | xmax () const |
| Real | min_val () const |
| Real | max_val () const |
| Real | root1 () const |
| Real | root2 () const |
| Size | degree () const |
| utility::vector1< Real > const & | coefficients () const |
| void | operator() (double const variable, double &value, double &deriv) const |
| Evaluate the polynomial and its derivative. More... | |
| double | eval (double const variable) |
| just evaluate the polynomial, w/o derivatives More... | |
| void | show (std::ostream &out) const |
Public Member Functions inherited from utility::VirtualBase | |
| VirtualBase ()=default | |
| Default constructor. More... | |
| virtual | ~VirtualBase ()=default |
| The virtual destructor is one of the main reasons for the VirtualBase class. More... | |
| VirtualBase (VirtualBase const &)=default | |
| VirtualBase (VirtualBase &&)=default | |
| VirtualBase & | operator= (VirtualBase const &)=default |
| VirtualBase & | operator= (VirtualBase &&)=default |
Private Attributes | |
| std::string | polynomial_name_ |
| Real | xmin_ |
| Real | xmax_ |
| Real | min_val_ |
| Real | max_val_ |
| Real | root1_ |
| Real | root2_ |
| Size | degree_ |
| utility::vector1< Real > | coefficients_ |
| numeric::Polynomial_1d::Polynomial_1d | ( | std::string const & | polynomial_name, |
| Real const | xmin, | ||
| Real const | xmax, | ||
| Real const | min_val, | ||
| Real const | max_val, | ||
| Real const | root1, | ||
| Real const | root2, | ||
| Size | degree, | ||
| utility::vector1< Real > const & | coefficients | ||
| ) |
ctor
References check_invariants().
| numeric::Polynomial_1d::Polynomial_1d | ( | Polynomial_1d const & | src | ) |
References check_invariants().
|
overridedefault |
| void numeric::Polynomial_1d::check_invariants | ( | ) | const |
References coefficients_, CREATE_EXCEPTION, degree_, xmax_, and xmin_.
Referenced by Polynomial_1d().
References coefficients_.
just evaluate the polynomial, w/o derivatives
References coefficients_, degree_, create_a3b_hbs::i, max_val_, min_val_, value, xmax_, and xmin_.
| string const & numeric::Polynomial_1d::name | ( | ) | const |
References polynomial_name_.
Referenced by pyrosetta.distributed.docs.ComponentDoc::__repr__(), options_class.Option::getCName(), options_class.Option::getDoxygenRow(), options_class.Option::getMarkdownRow(), options_class.Option::getOptionKeysCC(), options_class.Option::getWikiTableRow(), enumerate_junctions.DHR::print(), enumerate_junctions.DHR::to_component(), and enumerate_junctions.DHR::write_to_file().
| void numeric::Polynomial_1d::operator() | ( | double const | variable, |
| double & | value, | ||
| double & | deriv | ||
| ) | const |
Evaluate the polynomial and its derivative.
evaluate the polynomial and its derivative.
| variable | - [in] - evaluate polynomial(value) |
| value | - [out] - returned output |
| deriv | - [out] - returned output |
Polynomial value and derivative using Horner's rule value = Sum_(i = 1,...,N) [ coeff_i * variable^(i-1) ] deriv = Sum_(i = 2,...,N) [ ( i - 1 ) * coeff_i * variable^(i-2) ] JSS: Horner's rule for evaluating polynomials is based on rewriting the polynomial as: JSS: p(x) = a0 + x*(a1 + x*(a2 + x*(... x*(aN)...))) JSS: or value_k = a_k + x*value_k+1 for k = N-1 to 0 JSS: and the derivative is JSS: deriv_k = value_k+1 + deriv_k+1 for k = N-1 to 1
References coefficients_, degree_, create_a3b_hbs::i, max_val_, min_val_, value, xmax_, and xmin_.
| void numeric::Polynomial_1d::show | ( | std::ostream & | out | ) | const |
References ObjexxFCL::abs(), coefficients_, degree_, create_a3b_hbs::i, max_val_, min_val_, polynomial_name_, root1_, root2_, xmax_, and xmin_.
Referenced by pyrosetta.distributed.viewer.core.Viewer::__call__().
|
private |
Referenced by check_invariants(), coefficients(), eval(), operator()(), and show().
|
private |
Referenced by check_invariants(), degree(), eval(), operator()(), and show().
|
private |
Referenced by eval(), max_val(), operator()(), and show().
|
private |
Referenced by eval(), min_val(), operator()(), and show().
|
private |
Referenced by check_invariants(), eval(), operator()(), show(), and xmax().
|
private |
Referenced by check_invariants(), eval(), operator()(), show(), and xmin().