template<typename Arr>
EllStable class

Ellipsoid Search Space.

ell = {x | (x - xc)' mq^-1 (x - xc) \le \kappa}

Keep $Q$ symmetric but no promise of positive definite

Public types

using Vec = std::valarray<double>
using ArrayType = Arr

Constructors, destructors, conversion operators

EllStable(const Vec& val, Arr x)
Construct a new EllStable object.
EllStable(const double& alpha, Arr x)
Construct a new EllStable object.
EllStable(EllStable&& E) defaulted noexcept
Construct a new EllStable object.
~EllStable() defaulted
Destroy the EllStable object.
EllStable(const EllStable& E) defaulted explicit
Construct a new EllStable object.

Public functions

auto copy() const -> EllStable -> auto
explicitly copy
auto xc() const -> Arr -> auto
copy the whole array anyway
void set_xc(const Arr& xc)
Set the xc object.
auto tsq() const -> double -> auto
void set_use_parallel_cut(bool value)
template<typename T>
auto update_bias_cut(const std::pair<Arr, T>& cut) -> CutStatus -> auto
Update ellipsoid core function using the deep cut(s)
template<typename T>
auto update_central_cut(const std::pair<Arr, T>& cut) -> CutStatus -> auto
Update ellipsoid core function using the central cut(s)
template<typename T>
auto update_q(const std::pair<Arr, T>& cut) -> CutStatus -> auto
Update ellipsoid core function using the cut(s)

Function documentation

template<typename Arr>
EllStable<Arr>::EllStable(const Vec& val, Arr x)

Construct a new EllStable object.

Parameters
val in The parameter "val" is of type Vec, which is likely a vector or array-like data structure. It is being passed by reference to the constructor of the EllStable class.
in x is an object of type Arr, which is likely an array or vector. It is being passed by value to the constructor of the EllStable class.

The function is a constructor for an EllStable object that takes a Vec and an Arr as parameters.

template<typename Arr>
EllStable<Arr>::EllStable(const double& alpha, Arr x)

Construct a new EllStable object.

Parameters
alpha in The parameter alpha is a constant reference to a double value. It is used to initialize the _mgr member variable of the EllStable class.
in The parameter x is of type Arr, which is likely an array or vector of some kind. It is being passed by value, meaning a copy of the x object will be made and stored in the _xc member variable of the EllStable object being constructed.

The function constructs a new EllStable object with a given alpha value and an array of x values.

template<typename Arr>
EllStable<Arr>::EllStable(EllStable&& E) defaulted noexcept

Construct a new EllStable object.

Parameters
in The parameter "E" is an rvalue reference to an object of type "EllStable".

The function is a constructor for an EllStable object that takes an rvalue reference as a parameter.

template<typename Arr>
EllStable<Arr>::EllStable(const EllStable& E) explicit defaulted

Construct a new EllStable object.

Parameters
in The parameter "E" is a reference to an object of type "EllStable".

To avoid accidentally copying, only explicit copy is allowed

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

explicitly copy

Returns EllStable

template<typename Arr>
auto EllStable<Arr>::xc() const -> Arr

copy the whole array anyway

Returns Arr

template<typename Arr>
void EllStable<Arr>::set_xc(const Arr& xc)

Set the xc object.

Parameters
xc in

template<typename Arr>
auto EllStable<Arr>::tsq() const -> double

Returns Arr

template<typename Arr>
void EllStable<Arr>::set_use_parallel_cut(bool value)

Parameters
value in The value parameter is a boolean value that determines whether or not to use parallel cut.

The function sets the value of the use_parallel_cut property in the _mgr object.

template<typename Arr> template<typename T>
auto EllStable<Arr>::update_bias_cut(const std::pair<Arr, T>& cut) -> CutStatus

Update ellipsoid core function using the deep cut(s)

Template parameters
T
Parameters
cut in cutting-plane
Returns std::tuple<int, double>

The update_bias_cut function is a member function of the EllStable class. It is used to update the ellipsoid core function using a cutting plane.

template<typename Arr> template<typename T>
auto EllStable<Arr>::update_central_cut(const std::pair<Arr, T>& cut) -> CutStatus

Update ellipsoid core function using the central cut(s)

Template parameters
T
Parameters
cut in cutting-plane
Returns std::tuple<int, double>

The update_central_cut function is a member function of the EllStable class. It is used to update the ellipsoid core function using a cutting plane.

template<typename Arr> template<typename T>
auto EllStable<Arr>::update_q(const std::pair<Arr, T>& cut) -> CutStatus

Update ellipsoid core function using the cut(s)

Template parameters
T
Parameters
cut in cutting-plane
Returns std::tuple<int, double>

The update_q function is a member function of the EllStable class. It is used to update the ellipsoid core function using a cutting plane.