|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
forward declaration - sum op More...
#include <sum.hpp>
Public Types | |
| using | BaseT = Atom< Meta, Sum< Meta, Cs... >, Cs... > |
| CRTP base type. | |
| using | MatT = linalg::Matrix< T, 1, 1 > |
| Scalar affine map matrix type. | |
Public Types inherited from convex::Atom< Meta, Sum< Meta, Cs... >, 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 | Sum (const Cs &... cs) |
| Construct a sum atom from child atoms. | |
| constexpr | Sum (const affine::AffineMap< MatT > &map_in, const std::tuple< Cs... > &cs) |
| Construct a transformed sum atom from a scalar affine map. | |
| template<T Scalar> | |
| constexpr auto | mul () const |
| Scale this sum by a compile-time scalar. | |
| constexpr auto | add (T beta) const |
| Add a scalar offset to this sum. | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize_impl (const Builder &builder) const |
| Canonicalize this sum into a cone builder. | |
Public Member Functions inherited from convex::Atom< Meta, Sum< Meta, Cs... >, 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. | |
| constexpr auto | canonicalize (const Builder &builder) const |
| Dispatch canonicalization to the derived atom. | |
| constexpr const Sum< Meta, Cs... > & | self () const |
| Return this object as the CRTP-derived atom type. | |
Public Attributes | |
| affine::AffineMap< MatT > | map |
| Scalar affine transform applied after summing children. | |
Public Attributes inherited from convex::Atom< Meta, Sum< Meta, Cs... >, Cs... > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Additional Inherited Members | |
Static Public Attributes inherited from convex::Atom< Meta, Sum< Meta, Cs... >, Cs... > | |
| 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 - sum op
DCP sum atom over two or more child atoms.
| using convex::Sum< Meta, Cs >::MatT = linalg::Matrix<T, 1, 1> |
|
inlineexplicitconstexpr |
Construct a sum atom from child atoms.
| cs | child atoms to sum |
Definition at line 138 of file sum.hpp.
References convex::dom_size_v.
|
inlineexplicitconstexpr |
Construct a transformed sum atom from a scalar affine map.
| map_in | scalar affine transform applied to the child sum |
| cs | tuple of child atoms |
Definition at line 149 of file sum.hpp.
References convex::dom_size_v.
|
inlineconstexpr |
Add a scalar offset to this sum.
| beta | scalar |
Definition at line 176 of file sum.hpp.
References convex::Atom< Meta, Sum< Meta, Cs... >, Cs... >::children, convex::dom_size_v, and convex::Sum< Meta, Cs >::map.
|
inlineconstexpr |
Canonicalize this sum into a cone builder.
| Type | requested atom canonicalization target |
| Builder | canonical-form builder type |
| builder | current canonical-form builder |
Definition at line 193 of file sum.hpp.
References convex::Atom< Meta, Sum< Meta, Cs... >, Cs... >::children, convex::dom_size_v, convex::Sum< Meta, Cs >::map, convex::SET, and convex::tuple_fold_sum().
|
inlineconstexpr |
Scale this sum by a compile-time scalar.
| Scalar | scale factor applied to the selector map |
Definition at line 163 of file sum.hpp.
References convex::Atom< Meta, Sum< Meta, Cs... >, Cs... >::children, convex::dom_size_v, and convex::Sum< Meta, Cs >::map.
| affine::AffineMap<MatT> convex::Sum< Meta, Cs >::map |
Scalar affine transform applied after summing children.
Definition at line 220 of file sum.hpp.
Referenced by convex::Sum< Meta, Cs >::add(), convex::Sum< Meta, Cs >::canonicalize_impl(), and convex::Sum< Meta, Cs >::mul().