|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
forward declaration - norm fn More...
#include <norm.hpp>
Public Types | |
| using | ConvexBase = Atom< Meta, Norm< Meta, Child, NormFunc >, Child > |
| bring into scope the convex fn alias / helpers | |
Public Types inherited from convex::Atom< Meta, Norm< Meta, Child, NormFunc >, Child > | |
| using | Domain = meta_dom_t< Meta > |
| Atom input domain. | |
| using | Codomain = meta_codom_t< Meta > |
| Atom output codomain. | |
| using | ChildrenT = std::tuple< atom_decay_t< Cs >... > |
| Tuple of decayed child atom types. | |
| using | T = dom_type_t< Domain > |
| Scalar field for the atom domain. | |
| using | PointT = dom_point_t< Domain > |
| Point type accepted by the atom domain. | |
Public Member Functions | |
| constexpr | Norm (const Child &child_in) |
| CTOR. | |
| constexpr | Norm (const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in) |
| CTOR. | |
| constexpr MonotonicityType | monotonicity () const |
| mono | |
| constexpr T | operator() (const PointT &x) const |
| eval via operator overload | |
| constexpr T | eval (const PointT &x) const |
| eval impl | |
| template<T Scalar> | |
| constexpr auto | mul () const |
| mul | |
| constexpr auto | add (T beta) const |
| add | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize_impl (const Builder &builder) const |
| canonicalize_impl | |
Public Member Functions inherited from convex::Atom< Meta, Norm< Meta, Child, NormFunc >, Child > | |
| constexpr | Atom () |
| Construct a leaf atom with no children. | |
| constexpr | Atom (ChildrenT child_in) |
| Construct an atom with normalized children. | |
| constexpr void | validate_fn_domain (const auto &child) const |
| Validate DCP composition for a function child. | |
| constexpr void | validate_domain () const |
| Validate child domains, signs, curvature, and composition rules. | |
| constexpr auto | canonicalize (const Builder &builder) const |
| Dispatch canonicalization to the derived atom. | |
| constexpr const Norm< Meta, Child, NormFunc > & | self () const |
| Return this object as the CRTP-derived atom type. | |
Public Attributes | |
| affine::AffineMap< LiftedVarMat< T > > | lift_map |
| member vars | |
| const int | idx {-1} |
Public Attributes inherited from convex::Atom< Meta, Norm< Meta, Child, NormFunc >, Child > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Static Public Attributes | |
| static constexpr CurvatureType | Tag = meta_curv_v<Meta> |
| curvature tag | |
Static Public Attributes inherited from convex::Atom< Meta, Norm< Meta, Child, NormFunc >, Child > | |
| static constexpr std::size_t | N |
| Domain dimension. | |
| static constexpr std::size_t | M |
| Codomain dimension. | |
| static constexpr CurvatureType | Curvature |
| Curvature declared by atom metadata. | |
| static constexpr VarType | DomSign |
| Domain sign declared by atom metadata. | |
| static constexpr VarType | CodomSign |
| Codomain sign declared by atom metadata. | |
forward declaration - norm fn
norm convex function wrapper
|
inlineexplicitconstexpr |
add
| scalar |
Definition at line 159 of file norm.hpp.
References convex::dom_size_v.
|
inlineconstexpr |
canonicalize_impl
L2 Norm Function (1) f(x) = ||x||_2 K = { (x, t) | ||x||_2 <= t } K_soc = { (u, v) | ||u||_2 <= v, v >= 0 }
let u = x, v = t [ A 0 ] [ x; t ] + [ b; 0 ] -> (A x + b, t) [ 0 1 ]
(2) -f(x) = -||x||_2 K = { (x, t) | -||x||_2 >= t }... { (x, t) | ||x||_2 <= -t }
[ A 0 ] [ x; t ] + [ b; 0 ] -> (A x + b, -t) [ 0 -1 ]
Linf Norm Function (1) f(x) = ||x||_inf K = { (x, t) | ||x||_inf <= t }
-t <= x_i <= t... for all i 0 <= x_i + t... nonneg orthant cone(s) 0 <= t - x_i... nonneg orthant cone(s)
[ A 1 ] [ x; t ] + [ b; -b ] [ -A 1 ]
(2) -f(x) = -||x||_inf K = { (x, t) | -||x||_inf >= t }... { (x, t) | ||x||_inf <= -t }
[ A -1 ] [ x; t ] + [ b; -b ] [ -A -1 ]
L1 Norm Function (1) f(x) = ||x||_1 K = { (x, t) | ||x||_1 <= t }
let u_i >= |x_i|... convex constraint sum(u_i) <= t... convex constraint
-u_i <= y_i <= u_i 0 <= y_i + u_i... nonneg orthant cone 0 <= u_i - y_i... nonneg orthant cone 0 <= t - 1^T u... nonneg orthant cone
[ A I 0 ] [ x; u; t ] + [ b; -b; 0 ] [ -A I 0 ] [ 0 -1^T 1 ]
(2) -f(x) = -||x||_1 K = { (x, t) | -||x||_1 >= t }... { (x, t) | ||x||_1 <= -t }
[ A I 0 ] [ x; u; t ] + [ b; -b; 0 ] [ -A I 0 ] [ 0 -1^T -1 ] [ 0 I 0 ]
| cone | map builder |
| coord | map |
| cone | block |
Definition at line 231 of file norm.hpp.
References convex::CONCAVE, convex::CONVEX, and convex::dom_size_v.
eval impl
| point | x in domain |
Definition at line 114 of file norm.hpp.
References convex::CONVEX, and convex::dom_size_v.
|
inlineconstexpr |
mono
Definition at line 76 of file norm.hpp.
References convex::CONVEX, convex::dom_size_v, convex::NONDEC, convex::NONINC, convex::NONNEG, convex::NONPOS, and convex::UNKNOWN.
|
inlineconstexpr |
mul
Definition at line 128 of file norm.hpp.
References convex::CONCAVE, and convex::dom_size_v.
|
inlineconstexpr |
| const int convex::Norm< Meta, Child, NormFunc >::idx {-1} |
| affine::AffineMap<LiftedVarMat<T> > convex::Norm< Meta, Child, NormFunc >::lift_map |
|
staticconstexpr |