|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
forward declaration of LMI type More...
#include <lmi.hpp>
Public Types | |
| using | ConvexBase = ConvexSet< Meta, LMI< Meta, Child, MatIn >, Child > |
| bring into scope the type traits from the base class | |
| using | Mat = linalg::remove_cvref_t< MatIn > |
| lifted matrix for P | |
Public Types inherited from convex::ConvexSet< Meta, LMI< Meta, Child, MatIn >, Child > | |
| using | BaseT = Atom< Meta, ConvexSet< Meta, LMI< Meta, Child, MatIn >, Child >, Child > |
| alias to extract type traits from Domain convex set | |
Public Types inherited from convex::Atom< Meta, Derived, Cs > | |
| 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 | LMI (const linalg::Vector< Mat, N > &A_in, const Mat &B_in, const Child &child_in) |
| CTOR for LMI A & B split out. | |
| constexpr bool | contains_impl (const PointT &x, T) const |
| contains function to see if x is in the LMI defined as | |
| constexpr bool | is_well_formed () const |
| is_well_formed to check if the set is valid | |
| template<typename Other > | |
| constexpr bool | is_equal_impl (const Other &other) const |
| equality comparison | |
| template<linalg::MatrixContainer Mat> | |
| constexpr auto | transform_impl (const affine::AffineMap< Mat > &) const |
| transform impl | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize (const Builder &builder) const |
| canonicalize impl | |
Public Member Functions inherited from convex::ConvexSet< Meta, LMI< Meta, Child, MatIn >, Child > | |
| constexpr | ConvexSet (const Child &child_in) |
| CTOR. | |
| constexpr void | validate_domain_impl () const |
| is_well_formed | |
| constexpr bool | contains (const PointT &x, T tol=1e-8) const |
| contains to check if the point lies in the convex set | |
| constexpr auto | transform (const affine::AffineMap< Mat > &map) const |
| transform convex set by affine map | |
| constexpr bool | operator== (const ConvexSet< Meta, OtherDerived, OtherChild > &other) const |
| equality comparison overload | |
| constexpr bool | operator!= (const ConvexSet< Meta, OtherDerived, OtherChild > &other) const |
| inequality comparison overload | |
| constexpr auto | canonicalize_impl (const Builder &builder) const |
| canonicalize | |
| constexpr auto | self () const |
| self function which returns a const ref to the derived object | |
Public Member Functions inherited from convex::Atom< Meta, Derived, Cs > | |
| 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. | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize (const Builder &builder) const |
| Dispatch canonicalization to the derived atom. | |
| constexpr const Derived & | self () const |
| Return this object as the CRTP-derived atom type. | |
Public Attributes | |
| linalg::Vector< Mat, N > | A |
| member vars for LMI | |
| Mat | B |
| B offset. | |
Public Attributes inherited from convex::Atom< Meta, Derived, Cs > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Static Public Attributes | |
| static constexpr std::size_t | MatDim = linalg::mat_rows_v<Mat> |
Static Public Attributes inherited from convex::Atom< Meta, Derived, Cs > | |
| static constexpr std::size_t | N = dom_size_v<Domain> |
| Domain dimension. | |
| static constexpr std::size_t | M = dom_size_v<Codomain> |
| Codomain dimension. | |
| static constexpr CurvatureType | Curvature = meta_curv_v<Meta> |
| Curvature declared by atom metadata. | |
| static constexpr VarType | DomSign = dom_vartype_v<Domain> |
| Domain sign declared by atom metadata. | |
| static constexpr VarType | CodomSign = dom_vartype_v<Codomain> |
| Codomain sign declared by atom metadata. | |
forward declaration of LMI type
LMI (linear matrix inequality)
LMI solution set: 0 <= B + sum(x_i A_i).
| using convex::LMI< Meta, Child, MatIn >::Mat = linalg::remove_cvref_t<MatIn> |
|
inlineconstexpr |
canonicalize impl
Apply P^{-1}(C) -> K and map K to cone block
a_i = svec(A_i) in R^k A_i in S^n where k = n(n+1)/2 b = svec(B) ...
B + sum(x_i A_i) >= 0 ... psd cone
Definition at line 124 of file lmi.hpp.
References convex::LMI< Meta, Child, MatIn >::A, convex::LMI< Meta, Child, MatIn >::B, convex::Atom< Meta, Derived, Cs >::children, convex::dom_size_v, convex::Atom< Meta, Derived, Cs >::M, convex::LMI< Meta, Child, MatIn >::MatDim, and convex::Atom< Meta, Derived, Cs >::N.
|
inlineconstexpr |
contains function to see if x is in the LMI defined as
LMI (i) PSD: 0 <= B + A(x) (ii) PD: 0 < B + A(x)
| x | matrix with N vectors |
Definition at line 69 of file lmi.hpp.
References convex::LMI< Meta, Child, MatIn >::A, convex::LMI< Meta, Child, MatIn >::B, convex::dom_size_v, and convex::Atom< Meta, Derived, Cs >::N.
|
inlineconstexpr |
equality comparison
| convex | set |
Definition at line 94 of file lmi.hpp.
References convex::LMI< Meta, Child, MatIn >::A, convex::LMI< Meta, Child, MatIn >::B, convex::dom_size_v, and convex::Atom< Meta, Derived, Cs >::N.
|
inlineconstexpr |
is_well_formed to check if the set is valid
Cant really tell if B + sum(x_i A_i) >= 0 is valid until solve... so if construction passes well formed is fine
|
inlineconstexpr |
transform impl
| map |
Definition at line 109 of file lmi.hpp.
References convex::dom_size_v.
| linalg::Vector<Mat, N> convex::LMI< Meta, Child, MatIn >::A |
member vars for LMI
LMI of As
Definition at line 167 of file lmi.hpp.
Referenced by convex::LMI< Meta, Child, MatIn >::canonicalize(), convex::LMI< Meta, Child, MatIn >::contains_impl(), and convex::LMI< Meta, Child, MatIn >::is_equal_impl().
| Mat convex::LMI< Meta, Child, MatIn >::B |
B offset.
Definition at line 168 of file lmi.hpp.
Referenced by convex::LMI< Meta, Child, MatIn >::canonicalize(), convex::LMI< Meta, Child, MatIn >::contains_impl(), and convex::LMI< Meta, Child, MatIn >::is_equal_impl().
|
staticconstexpr |
Definition at line 44 of file lmi.hpp.
Referenced by convex::LMI< Meta, Child, MatIn >::canonicalize().