template<typename Arr>
Ell class

Ellipsoid Search Space.

The Ell class represents an ellipsoid search space:

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

It is used to define and manipulate ellipsoids in a multidimensional space. The ellipsoid is defined by a center point (_xc) and a core function (_mgr). The core function is responsible for updating the ellipsoid based on cutting planes. The Ell class provides methods to update the ellipsoid using different types of cutting planes and to retrieve information about the ellipsoid, such as the center point and the squared radius.

This version keeps $Q$ symmetric but no promise of positive definite

Public types

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

Constructors, destructors, conversion operators

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

Public functions

auto copy() const -> Ell -> 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>
Ell<Arr>::Ell(const Vec& val, Arr x)

Construct a new Ell 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 Ell 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 Ell class.

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

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

Construct a new Ell 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 Ell 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 Ell object being constructed.

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

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

Construct a new Ell object.

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

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

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

Construct a new Ell object.

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

To avoid accidentally copying, only explicit copy is allowed

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

explicitly copy

Returns Ell

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

copy the whole array anyway

Returns Arr

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

Set the xc object.

Parameters
xc in

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

Returns double

template<typename Arr>
void Ell<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 Ell<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 Ell class. It is used to update the ellipsoid core function using a cutting plane.

template<typename Arr> template<typename T>
auto Ell<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 Ell class. It is used to update the ellipsoid core function using a cutting plane.

template<typename Arr> template<typename T>
auto Ell<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 Ell class. It is used to update the ellipsoid core function using a cutting plane.