akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
Loading...
Searching...
No Matches
conic::Cone< Slack, Derived, CType > Struct Template Reference

cone base class More...

#include <cone.hpp>

Public Types

using T = linalg::vector_element_t< Slack >
 alias for mat type
 
using HessianMat = linalg::Matrix< T, M, M >
 hessian type
 

Public Member Functions

constexpr Slack x0 () const
 default interior point (initial slack in cone space)
 
constexpr Slack y0 () const
 default interior point (initial slack in dual cone)
 
constexpr bool in_cone (const Slack &x) const
 in the interior of k
 
constexpr bool in_dual_cone (const Slack &y) const
 in the interior of K^*
 
constexpr auto H (const Slack &x, const Slack &y) const
 hessian
 
constexpr T alpha_max (const Slack &x, const linalg::Vector< T, M > &p) const
 fraction to boundary dk
 
constexpr T alpha_max_dual (const Slack &y, const linalg::Vector< T, M > &p) const
 fraction to boundary dk^*
 
constexpr T nu () const
 barrier parameter
 
constexpr auto grad (const Slack &x) const
 gradient
 
constexpr auto e () const
 e (jordan identity)
 
constexpr auto w (const Slack &x, const Slack &y) const
 w (self-scaling point)
 
constexpr auto circ (const Slack &x, const Slack &y) const
 circ (jordan map/product operator)
 
constexpr auto trace (const Slack &x, const Slack &y) const
 trace
 
constexpr auto inv (const Slack &x) const
 inv (jordan inverse element)
 
constexpr T trace_weight () const
 Convert Euclidean complementarity to this cone's Jordan trace units.
 
template<typename Scaling >
constexpr auto scaled_affine_correction (const Slack &x, const Scaling &P, const Slack &px, const Slack &py) const
 Affine second-order correction in dual coordinates under NT scaling.
 
template<typename Scaling >
constexpr auto scaled_affine_correction_impl (const Slack &x, const Scaling &P, const Slack &px, const Slack &py) const
 Common symmetric-cone implementation using Jordan operations.
 
constexpr auto gamma_F (const Slack &x, const Slack &y) const
 gamma_F (functional proximity neighborhood metric)
 
constexpr auto self () const
 self function which returns a const ref to the derived object
 

Static Public Attributes

static constexpr std::size_t M = linalg::vector_dim_v<Slack>
 helpers to get M slack size
 
static constexpr T eps = 1e-8
 eps constant
 

Detailed Description

template<linalg::VectorContainer Slack, typename Derived, ConeType CType>
struct conic::Cone< Slack, Derived, CType >

cone base class

Definition at line 19 of file cone.hpp.

Member Typedef Documentation

◆ HessianMat

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
using conic::Cone< Slack, Derived, CType >::HessianMat = linalg::Matrix<T, M, M>

hessian type

Definition at line 30 of file cone.hpp.

◆ T

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
using conic::Cone< Slack, Derived, CType >::T = linalg::vector_element_t<Slack>

alias for mat type

Definition at line 21 of file cone.hpp.

Member Function Documentation

◆ alpha_max()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr T conic::Cone< Slack, Derived, CType >::alpha_max ( const Slack &  x,
const linalg::Vector< T, M > &  p 
) const
inlineconstexpr

fraction to boundary dk

sigma_x(p) = frac{1}{sup{alpha | x - alpha p in k }} alpha_max = frac{1}{sigma_x(p)}

we want the largest alpha that stays within k for our next step x_{k+1} = x_{k} - alpha p

Parameters
xin K
pin E
Returns
alpha_max

Definition at line 102 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ alpha_max_dual()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr T conic::Cone< Slack, Derived, CType >::alpha_max_dual ( const Slack &  y,
const linalg::Vector< T, M > &  p 
) const
inlineconstexpr

fraction to boundary dk^*

sigma_x(p) = frac{1}{sup{alpha | y - alpha p in k^* }} alpha_max = frac{1}{sigma_x(p)}

we want the largest alpha that stays within k for our next step y_{k+1} = y_{k} - alpha p

Parameters
yin K^*
pin E^*
Returns
alpha_max

Definition at line 120 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ circ()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::circ ( const Slack &  x,
const Slack &  y 
) const
inlineconstexpr

circ (jordan map/product operator)

Parameters
xin K
yin K^*
Returns
x circ y

Definition at line 180 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

Referenced by conic::Cone< Slack, Derived, CType >::scaled_affine_correction_impl().

◆ e()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::e ( ) const
inlineconstexpr

e (jordan identity)

x circ e = x

Returns
e

Definition at line 152 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

Referenced by conic::Cone< Slack, Derived, CType >::trace_weight().

◆ gamma_F()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::gamma_F ( const Slack &  x,
const Slack &  y 
) const
inlineconstexpr

gamma_F (functional proximity neighborhood metric)

Parameters
xin K
yin K^*
Returns
(gamma_F, event)

Definition at line 289 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

◆ grad()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::grad ( const Slack &  x) const
inlineconstexpr

gradient

F'(x)

Parameters
xin K
Returns
F'(x)

Definition at line 143 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ H()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::H ( const Slack &  x,
const Slack &  y 
) const
inlineconstexpr

hessian

Parameters
xin K
yin K^*
Returns
(H, event)

Definition at line 84 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ in_cone()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr bool conic::Cone< Slack, Derived, CType >::in_cone ( const Slack &  x) const
inlineconstexpr

in the interior of k

x in K

Parameters
xin K
Returns
bool

Definition at line 59 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ in_dual_cone()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr bool conic::Cone< Slack, Derived, CType >::in_dual_cone ( const Slack &  y) const
inlineconstexpr

in the interior of K^*

y in K^* ?

Parameters
yin K^*
Returns
bool

Definition at line 72 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ inv()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::inv ( const Slack &  x) const
inlineconstexpr

inv (jordan inverse element)

Parameters
xin K or y in K^*
Returns
(x^{-1}, event)

Definition at line 207 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

Referenced by conic::Cone< Slack, Derived, CType >::scaled_affine_correction_impl().

◆ nu()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr T conic::Cone< Slack, Derived, CType >::nu ( ) const
inlineconstexpr

barrier parameter

For jordan algebra it is associated with the dimension of the cone

Returns
nu

Definition at line 132 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ scaled_affine_correction()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
template<typename Scaling >
constexpr auto conic::Cone< Slack, Derived, CType >::scaled_affine_correction ( const Slack &  x,
const Scaling &  P,
const Slack &  px,
const Slack &  py 
) const
inlineconstexpr

Affine second-order correction in dual coordinates under NT scaling.

In the Euclidean Jordan algebra, let L_lambda(v) = lambda circ v. With lambda = W^-1*x = W*y, solve L_lambda(v) = (W^-1*px) circ (W*py), then return W^-1*v. This converts the affine product to the reduced dual-step equation; it is not a geometric cross product or an orthogonal-vector operation.

Reference: L. Vandenberghe, "The CVXOPT linear and quadratic cone program solvers," sections 4 (NT scaling) and 5, equation (19b). https://www.seas.ucla.edu/~vandenbe/publications/coneprog.pdf

Definition at line 246 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

◆ scaled_affine_correction_impl()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
template<typename Scaling >
constexpr auto conic::Cone< Slack, Derived, CType >::scaled_affine_correction_impl ( const Slack &  x,
const Scaling &  P,
const Slack &  px,
const Slack &  py 
) const
inlineconstexpr

◆ self()

◆ trace()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::trace ( const Slack &  x,
const Slack &  y 
) const
inlineconstexpr

trace

Parameters
xin K
yin K^*
Returns
tr(x circ y)

Definition at line 194 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

Referenced by conic::Cone< Slack, Derived, CType >::trace_weight().

◆ trace_weight()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr T conic::Cone< Slack, Derived, CType >::trace_weight ( ) const
inlineconstexpr

Convert Euclidean complementarity to this cone's Jordan trace units.

For the supported symmetric cones, trace(u, v) = weight * <u, v>. Evaluate that constant ratio at the Jordan identity: weight is 1 for the orthant and PSD (svec coordinates), and 2 for SOC.

The predictor-corrector uses mu_global = <x, y> / sum_k nu_k over the entire product cone. Multiplying by this weight gives the local coefficient of grad(x_k) = -inv(x_k) in its reduced complementarity residual. This is a cone-specific normalization, independent of the current iterate; it does not compute a local gap or change the shared centering target.

Definition at line 226 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::e(), and conic::Cone< Slack, Derived, CType >::trace().

◆ w()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr auto conic::Cone< Slack, Derived, CType >::w ( const Slack &  x,
const Slack &  y 
) const
inlineconstexpr

w (self-scaling point)

Parameters
xin K
yin K^*
Returns
(w, event)

Definition at line 166 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self(), and conic::SYMMETRIC.

◆ x0()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr Slack conic::Cone< Slack, Derived, CType >::x0 ( ) const
inlineconstexpr

default interior point (initial slack in cone space)

x0 in S^0(P)

Returns
vector

Definition at line 39 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

◆ y0()

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr Slack conic::Cone< Slack, Derived, CType >::y0 ( ) const
inlineconstexpr

default interior point (initial slack in dual cone)

y0 in S^0(D)

Returns
vector

Definition at line 48 of file cone.hpp.

References conic::Cone< Slack, Derived, CType >::self().

Member Data Documentation

◆ eps

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr T conic::Cone< Slack, Derived, CType >::eps = 1e-8
staticconstexpr

eps constant

Definition at line 27 of file cone.hpp.

◆ M

template<linalg::VectorContainer Slack, typename Derived , ConeType CType>
constexpr std::size_t conic::Cone< Slack, Derived, CType >::M = linalg::vector_dim_v<Slack>
staticconstexpr

helpers to get M slack size

Definition at line 24 of file cone.hpp.

Referenced by conic::Cone< Slack, Derived, CType >::scaled_affine_correction_impl().


The documentation for this struct was generated from the following files: