24template <linalg::VectorContainer Slack>
25struct ExpCone :
public Cone<Slack, ExpCone<Slack>, ConeType::ASYMMETRIC> {
33 static_assert(
M % 3 == 0,
"Exp cone must be a triplet");
42 for (std::size_t i = 0; i <
M / 3; ++i) s(i) =
T(0);
43 for (std::size_t i =
M / 3; i < 2 *
M / 3; ++i) s(i) =
T(1);
44 for (std::size_t i = 2 *
M / 3; i <
M; ++i) s(i) =
T(2);
56 for (std::size_t i = 0; i <
M / 3; ++i) {
58 const auto v = x(
M / 3 + i);
59 const auto w = x(2 *
M / 3 + i);
60 if (v <=
T(0) || v * linalg::constexpr_exp(u / v) >=
w)
return false;
74 const linalg::Vector<T, M>& p)
const {
static constexpr std::size_t M
helpers to get M slack size
linalg::vector_element_t< Slack > T
alias for mat type
constexpr auto w(const Slack &x, const Slack &y) const
w (self-scaling point)
constexpr Slack x0_impl() const
default interior point
constexpr bool in_cone_impl(const Slack &x) const
in interior of K
constexpr T alpha_max_impl(const Slack &x, const linalg::Vector< T, M > &p) const
fraction to boundary dK