|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
forward declaration of convex set More...
#include <convex_set.hpp>
Public Types | |
| using | BaseT = Atom< Meta, ConvexSet< Meta, Derived, Child >, Child > |
| alias to extract type traits from Domain convex set | |
Public Types inherited from convex::Atom< Meta, ConvexSet< Meta, Derived, Child >, 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 | 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 | |
| template<linalg::MatrixContainer Mat> | |
| constexpr auto | transform (const affine::AffineMap< Mat > &map) const |
| transform convex set by affine map | |
| template<typename OtherDerived , typename OtherChild > | |
| constexpr bool | operator== (const ConvexSet< Meta, OtherDerived, OtherChild > &other) const |
| equality comparison overload | |
| template<typename OtherDerived , typename OtherChild > | |
| constexpr bool | operator!= (const ConvexSet< Meta, OtherDerived, OtherChild > &other) const |
| inequality comparison overload | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| 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, ConvexSet< Meta, Derived, Child >, 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 ConvexSet< Meta, Derived, Child > & | self () const |
| Return this object as the CRTP-derived atom type. | |
Additional Inherited Members | |
Public Attributes inherited from convex::Atom< Meta, ConvexSet< Meta, Derived, Child >, Child > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Static Public Attributes inherited from convex::Atom< Meta, ConvexSet< Meta, Derived, Child >, 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 of convex set
Base convex set class CRTP.
Restricting domain to R^n for the time being
Templated by a vector space and derived class
Definition at line 25 of file convex_set.hpp.
| using convex::ConvexSet< Meta, Derived, Child >::BaseT = Atom<Meta, ConvexSet<Meta, Derived, Child>, Child> |
alias to extract type traits from Domain convex set
Definition at line 27 of file convex_set.hpp.
|
inlineconstexpr |
canonicalize
P^{-1}(C) -> K
Definition at line 115 of file convex_set.hpp.
References convex::dom_size_v, and convex::ConvexSet< Meta, Derived, Child >::self().
|
inlineconstexpr |
contains to check if the point lies in the convex set
| point | (n-dim vector) |
| optional | tolerance |
Definition at line 62 of file convex_set.hpp.
References convex::dom_size_v, and convex::ConvexSet< Meta, Derived, Child >::self().
|
inlineconstexpr |
inequality comparison overload
| convex | set |
Definition at line 102 of file convex_set.hpp.
References convex::dom_size_v, and convex::ConvexSet< Meta, Derived, Child >::self().
|
inlineconstexpr |
equality comparison overload
| convex | set |
Definition at line 89 of file convex_set.hpp.
References convex::dom_size_v, and convex::ConvexSet< Meta, Derived, Child >::self().
|
inlineconstexpr |
self function which returns a const ref to the derived object
Definition at line 124 of file convex_set.hpp.
References convex::dom_size_v.
Referenced by convex::ConvexSet< Meta, Derived, Child >::canonicalize_impl(), convex::ConvexSet< Meta, Derived, Child >::contains(), convex::ConvexSet< Meta, Derived, Child >::operator!=(), convex::ConvexSet< Meta, Derived, Child >::operator==(), convex::ConvexSet< Meta, Derived, Child >::transform(), and convex::ConvexSet< Meta, Derived, Child >::validate_domain_impl().
|
inlineconstexpr |
transform convex set by affine map
This is applied to convex sets like ellipsoid, polyhedron, simplex, etc... its image is another convex set
| affine | map |
Definition at line 77 of file convex_set.hpp.
References convex::ConvexSet< Meta, Derived, Child >::self().
|
inlineconstexpr |
is_well_formed
Check to see if the underlying convex set is valid
Definition at line 49 of file convex_set.hpp.
References convex::dom_size_v, and convex::ConvexSet< Meta, Derived, Child >::self().