58 return os <<
"✓ success";
60 return os <<
"✗ no solution";
62 return os <<
"⏭ no effect";
64 return os <<
"? unknown";
97template <
typename T>
using ArrayType =
typename T::ArrayType;
104template <
typename T>
using CutChoice =
typename T::CutChoice;
132#if __cpp_concepts >= 201907L
141template <
typename O,
typename A>
143 {
o.assess_feas(
x) };
146template <
typename O,
typename A,
typename N>
148 {
o.assess_optim(
x,
g) };
151template <
typename O,
typename A,
typename N>
153 {
o.assess_optim_q(
x,
g,
r) };
156template <
typename O,
typename N>
162concept SearchSpace =
requires(
S&
s,
const std::pair<typename S::ArrayType, double>& cut) {
163 typename S::ArrayType;
166 {
s.update_bias_cut(cut) } -> std::same_as<CutStatus>;
167 {
s.update_central_cut(cut) } -> std::same_as<CutStatus>;
auto invalid_value() -> T
Return an invalid/sentinel value for type T.
Definition cutting_plane.hpp:27
typename T::CutChoice CutChoice
Type alias for the cut choice type used by template parameter T.
Definition ell_config.hpp:104
auto operator<<(std::ostream &os, CutStatus s) -> std::ostream &
Stream output operator for CutStatus.
Definition ell_config.hpp:55
double SingleCut
Single cut parameter β in gᵀ(x - xc) + β ≤ 0.
Definition ell_config.hpp:129
typename T::ArrayType ArrayType
Type alias for the array type used by template parameter T.
Definition ell_config.hpp:97
std::tuple< CutConcept< T >, bool, ArrayType< T >, bool > RetQ
Type alias for return type of Q optimization.
Definition ell_config.hpp:118
std::pair< ArrayType< T >, CutChoice< T > > CutConcept
Type alias for a cutting plane concept.
Definition ell_config.hpp:111
CutStatus
Status of cutting plane operations.
Definition ell_config.hpp:47
@ NoSoln
No solution exists (infeasible)
@ Success
Cut was successful and ellipsoid was updated.
@ NoEffect
Cut had no effect on ellipsoid.
Information about the cutting-plane computation result.
Definition ell_config.hpp:87
bool feasible
Whether a feasible solution was found.
Definition ell_config.hpp:88
size_t num_iters
Number of iterations performed.
Definition ell_config.hpp:89
Result of a cutting-plane calculation.
Definition ell_config.hpp:75
double delta
Contraction factor for ellipsoid volume.
Definition ell_config.hpp:79
double sigma
Scaling factor for matrix update.
Definition ell_config.hpp:78
CutStatus status
Status of the cut.
Definition ell_config.hpp:76
double rho
Step size along gradient direction.
Definition ell_config.hpp:77
Configuration options for the ellipsoid algorithm.
Definition ell_config.hpp:19
Options(size_t max_iters, double tol)
Constructor with custom parameters.
Definition ell_config.hpp:38
size_t max_iters
Maximum number of iterations allowed.
Definition ell_config.hpp:20
Options()
Default constructor.
Definition ell_config.hpp:30
bool verbose
Enable iteration logging.
Definition ell_config.hpp:22
double tolerance
Convergence tolerance for stopping criteria.
Definition ell_config.hpp:21