|
| Quadratic () |
|
std::string | name_impl () const |
|
void | evaluate_impl (Real x, Real &out) const |
|
void | first_derivative_impl (Real x, Real &out) const |
|
void | second_derivative_impl (Real, Real &out) const |
|
| ScalarFunction () |
|
std::string | name () const |
|
void | evaluate (Real x, Real &out) const |
|
void | first_derivative (Real x, Real &out) const |
|
void | second_derivative (Real x, Real &out) const |
|
| Function () |
|
std::string | name () const |
|
void | evaluate (const InputType &x, OutputType &out) const |
|
void | first_derivative (const InputType &x, FirstDerivativeType &out) const |
|
void | second_derivative (const InputType &x, SecondDerivativeType &out) const |
|
constexpr Integer | input_dimension () const |
|
constexpr Integer | output_dimension () const |
|
const std::vector< InputType > & | solutions () const |
|
const std::vector< InputType > & | guesses () const |
|
const InputType & | solution (const Integer i) const |
|
const InputType & | guess (const Integer i) const |
|
bool | is_solution (const InputType &x, const Real tol=EPSILON_LOW) const |
|
template<typename Real>
class Optimist::TestSet::Quadratic< Real >
Class container for the quadratic function, which is defined as:
\[f(x) = ax^2 + bx + c \text{.}
\]
The function has roots at
\[x = \sqrt{\displaystyle\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}} \text{,}
\]
and a minimum at
\[x = -\displaystyle\frac{b}{2a} \text{.}
\]
The default coefficients are \(a = 1\), \(b = 1\), and \(c = -1\), and the function initial guess is \(x = 0\).
- Template Parameters
-