21template <linalg::VectorContainer Slack>
22struct PowerCone :
public Cone<Slack, PowerCone<Slack>, ConeType::ASYMMETRIC> {
47 for (std::size_t i = 0; i <
M - 1; ++i) s(i) =
T(1);
59 if (
T(x(
M - 1)) ==
T(0)) {
60 for (std::size_t i = 0; i <
M - 1; ++i)
61 if (x(i) <
T(0))
return false;
65 for (std::size_t i = 0; i <
M - 1; ++i) {
66 if (!(x(i) >
T(0)))
return false;
67 res +=
alphas(i) * linalg::constexpr_ln_safe(x(i));
70 linalg::constexpr_ln_safe(linalg::constexpr_abs(x(
M - 1)));
84 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
AlphaVec alphas
member vars for power cone
constexpr PowerCone(const AlphaVec &alphas_in)
PowerCone.
linalg::Vector< T, M - 1 > AlphaVec
alpha vec
constexpr T alpha_max_impl(const Slack &x, const linalg::Vector< T, M > &p) const
fraction to boundary dK
constexpr Slack x0_impl() const
default interior point
constexpr bool in_cone_impl(const Slack &x) const
in interior of K