|
| | Quadratic () |
| constexpr std::string | name_impl () const |
| bool | evaluate_impl (const Scalar x, Scalar &out) const |
| bool | first_derivative_impl (const Scalar x, Scalar &out) const |
| bool | second_derivative_impl (Scalar, Scalar &out) const |
| | Function () |
| constexpr std::string | name () const |
| bool | evaluate (const Scalar &x, Scalar &out) const |
| bool | jacobian (const Scalar &x, FirstDerivative &out) const |
| bool | hessian (const Scalar &x, SecondDerivative &out) const |
| | FunctionBase () |
| constexpr std::string | name () const |
| bool | evaluate (const Scalar &x, Scalar &out) const |
| bool | first_derivative (const Scalar &x, FirstDerivative &out) const |
| bool | second_derivative (const Scalar &x, SecondDerivative &out) const |
| constexpr Integer | input_dimension () const |
| constexpr Integer | output_dimension () const |
| const std::vector< Scalar > & | solutions () const |
| const std::vector< Scalar > & | guesses () const |
| const Scalar & | solution (const Integer i) const |
| const Scalar & | guess (const Integer i) const |
| bool | is_solution (const Scalar &x, const Scalar tol=FunctionBase::SQRT_EPSILON) const |
template<typename
Scalar>
requires
TypeTrait<
Scalar>::IsScalar
class Optimist::TestSet::Quadratic< Scalar >
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
-
| Scalar | Floating-point number type. |