|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
forward declaration of affine subspace More...
#include <affine_subspace.hpp>
Public Types | |
| using | ConvexBase = ConvexSet< Meta, AffineSubspace< Meta, Child >, Child > |
| bring into scope convex fn alias / helpers | |
| using | Mat = linalg::Matrix< T, M, N > |
| linear map | |
| using | AmbientVec = linalg::Vector< T, M > |
| alias for ambient vector | |
Public Types inherited from convex::ConvexSet< Meta, AffineSubspace< Meta, Child >, Child > | |
| using | BaseT = Atom< Meta, ConvexSet< Meta, AffineSubspace< Meta, Child >, 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 | AffineSubspace (const Mat &A_in, const AmbientVec &b_in, const Child &child_in) |
| CTOR for affine subspace. | |
| constexpr bool | contains_impl (const PointT &x, T tol) const |
| contains function | |
| constexpr bool | is_well_formed () const |
| is well formed checks to see if basis fully spans subspace | |
| template<typename Other > | |
| constexpr bool | is_equal_impl (const Other &other) const |
| equality comparison | |
| template<linalg::SquareMatrix TMat> requires (linalg::mat_cols_v<TMat> == N && std::same_as<linalg::matrix_scalar_t<TMat>, T>) | |
| constexpr auto | transform_impl (const affine::AffineMap< TMat > &map) const |
| transform | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize_set (const Builder &builder) const |
| canonicalize impl | |
Public Member Functions inherited from convex::ConvexSet< Meta, AffineSubspace< Meta, Child >, 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 | |
| Mat | A |
| data members for affine subspace | |
| AmbientVec | b |
Public Attributes inherited from convex::Atom< Meta, Derived, Cs > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Additional Inherited Members | |
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 affine subspace
Affine Set in the perspective of an affine equality set.
C = { x | A x = b } C is an affine subspace of R^n where A in R^{m x n} and b in R^m
Definition at line 32 of file affine_subspace.hpp.
| using convex::AffineSubspace< Meta, Child >::AmbientVec = linalg::Vector<T, M> |
alias for ambient vector
Definition at line 46 of file affine_subspace.hpp.
| using convex::AffineSubspace< Meta, Child >::ConvexBase = ConvexSet<Meta, AffineSubspace<Meta, Child>, Child> |
bring into scope convex fn alias / helpers
Definition at line 34 of file affine_subspace.hpp.
linear map
Definition at line 43 of file affine_subspace.hpp.
|
inlineexplicitconstexpr |
CTOR for affine subspace.
| A | in R^{m x n} |
| b | in R^m |
| child |
Definition at line 55 of file affine_subspace.hpp.
|
inlineconstexpr |
canonicalize impl
Affine subspace: A x = b
The current path keeps affine sets in the explicit equality map rather than lifting them into cone constraints.
Definition at line 131 of file affine_subspace.hpp.
References convex::AffineSubspace< Meta, Child >::A, convex::AffineSubspace< Meta, Child >::b, convex::Atom< Meta, Derived, Cs >::children, convex::dom_size_v, and convex::Atom< Meta, Derived, Cs >::N.
|
inlineconstexpr |
contains function
| point | x in R^n |
| tolerance |
Definition at line 67 of file affine_subspace.hpp.
References convex::AffineSubspace< Meta, Child >::A, convex::AffineSubspace< Meta, Child >::b, and convex::dom_size_v.
|
inlineconstexpr |
equality comparison
| affine | set |
Definition at line 89 of file affine_subspace.hpp.
References convex::AffineSubspace< Meta, Child >::A, convex::AffineSubspace< Meta, Child >::b, and convex::dom_size_v.
|
inlineconstexpr |
is well formed checks to see if basis fully spans subspace
Definition at line 76 of file affine_subspace.hpp.
References convex::AffineSubspace< Meta, Child >::A, convex::dom_size_v, and convex::Atom< Meta, Derived, Cs >::N.
|
inlineconstexpr |
transform
C = { x | A x = b } f(C) = { y = f(x) | x in C } y = U x + t to x = U^{-1} (y - t) A U^{-1} (y - t) = b to A U^{-1} y = b + A U^{-1} t
| affine | map |
Definition at line 109 of file affine_subspace.hpp.
References convex::AffineSubspace< Meta, Child >::A, convex::AffineSubspace< Meta, Child >::b, convex::Atom< Meta, Derived, Cs >::children, and convex::dom_size_v.
data members for affine subspace
Definition at line 150 of file affine_subspace.hpp.
Referenced by convex::AffineSubspace< Meta, Child >::canonicalize_set(), convex::AffineSubspace< Meta, Child >::contains_impl(), convex::AffineSubspace< Meta, Child >::is_equal_impl(), convex::AffineSubspace< Meta, Child >::is_well_formed(), and convex::AffineSubspace< Meta, Child >::transform_impl().
| AmbientVec convex::AffineSubspace< Meta, Child >::b |