EllAlgo 1.6.13
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Ell< Arr > Class Template Reference

Ellipsoid Search Space (classic strategy) More...

#include <ell.hpp>

Inheritance diagram for Ell< Arr >:
[legend]
Collaboration diagram for Ell< Arr >:
[legend]

Public Types

using Vec = std::valarray< double >
 
using ArrayType = Arr
 
- Public Types inherited from EllBase< Arr, false >
using Vec = std::valarray< double >
 
using ArrayType = Arr
 

Public Member Functions

 Ell (const Vec &val, Arr x)
 Construct from a diagonal vector and a center point (moved in).
 
 Ell (const double alpha, Arr x)
 Construct from a scaling factor and a center point (moved in).
 
 Ell (Ell &&E) noexcept=default
 Move constructor.
 
auto operator= (Ell &&E) noexcept -> Ell &=default
 Move assignment operator.
 
 ~Ell ()=default
 Destructor.
 
 Ell (const Ell &E)=default
 Explicit copy constructor.
 
auto operator= (const Ell &E) -> Ell &=delete
 Deleted copy assignment operator (non-copyable).
 
auto copy () const -> Ell
 Explicitly copy the Ell object.
 
- Public Member Functions inherited from EllBase< Arr, false >
auto operator= (EllBase &&E) noexcept -> EllBase &=default
 Move assignment operator.
 
 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)
 
 EllBase (const EllBase &E)=default
 Construct a new EllBase object (explicit copy)
 
 ~EllBase ()=default
 Destroy the EllBase object.
 
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.
 
auto update_bias_cut (const std::pair< Arr, T > &cut) -> CutStatus
 Update ellipsoid using a deep cut.
 
auto update_central_cut (const std::pair< Arr, T > &cut) -> CutStatus
 Update ellipsoid using a central cut.
 
auto update_q (const std::pair< Arr, T > &cut) -> CutStatus
 Update ellipsoid using a cut with a specific Q matrix.
 

Static Public Member Functions

static auto from_radii (const Vec &val, Arr x) -> Ell
 Named constructor: initial ellipsoid from per-axis radii.
 
static auto from_alpha (const double alpha, Arr x) -> Ell
 Named constructor: initial ellipsoid from a scaling factor.
 

Additional Inherited Members

- Protected Member Functions inherited from EllBase< Arr, false >
auto operator= (const EllBase &E) -> EllBase &=delete
 Deleted copy assignment operator (non-copyable).
 
auto _update_core (const std::pair< Arr, T > &cut, Fn &&cut_strategy) -> CutStatus
 Update ellipsoid core function using the cut(s).
 
- Protected Attributes inherited from EllBase< Arr, false >
size_t _n
 
Arr _xc
 
EllCore _mgr
 

Detailed Description

template<typename Arr>
class Ell< Arr >

Ellipsoid Search Space (classic strategy)

Concrete strategy of EllBase with the classic direct Q-update: EllCore::update_* is used for cutting-plane updates.

\[ \mathcal{E} = \{x \mid (x - x_c)^T Q^{-1} (x - x_c) \le \kappa\} \]

Template Parameters
ArrArray type of the center point

Member Typedef Documentation

◆ ArrayType

◆ Vec

template<typename Arr >
using Ell< Arr >::Vec = std::valarray<double>

Constructor & Destructor Documentation

◆ Ell() [1/4]

template<typename Arr >
Ell< Arr >::Ell ( const Vec val,
Arr  x 
)
inline

Construct from a diagonal vector and a center point (moved in).

◆ Ell() [2/4]

template<typename Arr >
Ell< Arr >::Ell ( const double  alpha,
Arr  x 
)
inline

Construct from a scaling factor and a center point (moved in).

◆ Ell() [3/4]

template<typename Arr >
Ell< Arr >::Ell ( Ell< Arr > &&  E)
defaultnoexcept

Move constructor.

◆ ~Ell()

template<typename Arr >
Ell< Arr >::~Ell ( )
default

Destructor.

◆ Ell() [4/4]

template<typename Arr >
Ell< Arr >::Ell ( const Ell< Arr > &  E)
explicitdefault

Explicit copy constructor.

Member Function Documentation

◆ copy()

template<typename Arr >
auto Ell< Arr >::copy ( ) const -> Ell
inline

Explicitly copy the Ell object.

Returns
Ell A new Ell object that is a copy of the current object.

◆ from_alpha()

template<typename Arr >
static auto Ell< Arr >::from_alpha ( const double  alpha,
Arr  x 
) -> Ell
inlinestatic

Named constructor: initial ellipsoid from a scaling factor.

Parameters
[in]alphaA double value representing the scaling factor.
[in]xAn array of type Arr. This parameter is moved.
Returns
Ell A new Ell object.

◆ from_radii()

template<typename Arr >
static auto Ell< Arr >::from_radii ( const Vec val,
Arr  x 
) -> Ell
inlinestatic

Named constructor: initial ellipsoid from per-axis radii.

Parameters
[in]valA vector of per-axis radii (diagonal of the shape matrix).
[in]xAn array of type Arr. This parameter is moved.
Returns
Ell A new Ell object.

◆ operator=() [1/2]

template<typename Arr >
auto Ell< Arr >::operator= ( const Ell< Arr > &  E) -> Ell &=delete
delete

Deleted copy assignment operator (non-copyable).

◆ operator=() [2/2]

template<typename Arr >
auto Ell< Arr >::operator= ( Ell< Arr > &&  E) -> Ell &=default
defaultnoexcept

Move assignment operator.


The documentation for this class was generated from the following file: