|
EllAlgo 1.6.13
|
Ellipsoid Search Space (shared base) More...
#include <ell_base.hpp>
Public Types | |
| using | Vec = std::valarray< double > |
| using | ArrayType = Arr |
Public Member Functions | |
| EllBase (const Vec &val, Arr x) | |
| Construct a new EllBase object from a vector and an array. | |
| EllBase (const double alpha, Arr x) | |
| Construct a new EllBase object from an alpha value and an array. | |
| EllBase (EllBase &&E) noexcept=default | |
| Construct a new EllBase object (move constructor) | |
| auto | operator= (EllBase &&E) noexcept -> EllBase &=default |
| Move assignment operator. | |
| ~EllBase ()=default | |
| Destroy the EllBase object. | |
| EllBase (const EllBase &E)=default | |
| Construct a new EllBase object (explicit copy) | |
| auto | xc () const -> Arr |
| Get the center of the ellipsoid. | |
| void | set_xc (const Arr &xc) |
| Set the center of the ellipsoid. | |
| constexpr auto | tsq () const -> double |
| Get the squared radius of the ellipsoid. | |
| void | set_use_parallel_cut (bool value) |
| Set whether to use parallel cut. | |
| template<typename T > | |
| auto | update_bias_cut (const std::pair< Arr, T > &cut) -> CutStatus |
| Update ellipsoid using a deep cut. | |
| template<typename T > | |
| auto | update_central_cut (const std::pair< Arr, T > &cut) -> CutStatus |
| Update ellipsoid using a central cut. | |
| template<typename T > | |
| auto | update_q (const std::pair< Arr, T > &cut) -> CutStatus |
| Update ellipsoid using a cut with a specific Q matrix. | |
Protected Member Functions | |
| auto | operator= (const EllBase &E) -> EllBase &=delete |
| Deleted copy assignment operator (non-copyable). | |
| template<typename T , typename Fn > | |
| auto | _update_core (const std::pair< Arr, T > &cut, Fn &&cut_strategy) -> CutStatus |
| Update ellipsoid core function using the cut(s). | |
Protected Attributes | |
| size_t | _n |
| Arr | _xc |
| EllCore | _mgr |
Ellipsoid Search Space (shared base)
The EllBase class represents an ellipsoid search space:
\[ \mathcal{E} = \{x \mid (x - x_c)^T Q^{-1} (x - x_c) \le \kappa\} \]
This version keeps $Q$ symmetric but no promise of positive definite.
Stable selects the ellipsoid-update strategy at compile time. When Stable == true the numerically-stable LDL^T update path is used (EllCore::update_stable_*); otherwise the classic direct Q-update is used (EllCore::update_*). Ell and EllStable are thin subclasses pinning this strategy while exposing identical public APIs.
n-dimensional space
┌─┐
┌─┘ └─┐
┌─┘ └─┐
┌─┘ └─┐ ←─ ellipsoid boundary
│ ● xc │ center point
└─┐ ┌─┘
└─┐ ┌─┘
└─┐ ┌─┘
└─┘
| Arr | Array type of the center point |
| Stable | Compile-time strategy selector (true = LDL^T stable updates) |
Construct a new EllBase object (move constructor)
| [in] | E | The parameter "E" is an rvalue reference to an object of type "EllBase". |
Destroy the EllBase object.
Construct a new EllBase object (explicit copy)
| [in] | E | The parameter "E" is a reference to an object of type "EllBase". |
|
inlineprotected |
Update ellipsoid core function using the cut(s).
| T | Type of the beta parameter. |
| Fn | Type of the cut strategy function. |
| [in] | cut | A pair containing the gradient and beta value. |
| [in] | cut_strategy | The strategy function to apply the cut. |
|
protecteddelete |
Deleted copy assignment operator (non-copyable).
|
defaultnoexcept |
Move assignment operator.
| [in] | E | The parameter "E" is an rvalue reference to an object of type "EllBase". |
Set whether to use parallel cut.
| [in] | value | True to use parallel cut, false otherwise. |
Set the center of the ellipsoid.
| [in] | xc | The new center of the ellipsoid. |
Get the squared radius of the ellipsoid.
|
inline |
Update ellipsoid using a deep cut.
\[ g^T (x - x_c) + \beta \le 0 \]
| T | Type of the beta parameter. |
| [in] | cut | A pair containing the gradient and beta value. |
|
inline |
Update ellipsoid using a central cut.
\[ g^T (x - x_c) \le 0 \]
| T | Type of the beta parameter. |
| [in] | cut | A pair containing the gradient and beta value. |
|
inline |
Update ellipsoid using a cut with a specific Q matrix.
\[ Q^+ = Q - \frac{\sigma}{\omega} Q g g^T Q, \qquad \kappa^+ = \kappa \cdot \delta \]
| T | Type of the beta parameter. |
| [in] | cut | A pair containing the gradient and beta value. |
Get the center of the ellipsoid.