|
akreon-convex
Typed convex modeling, conic canonicalization, and primal-dual optimization in C++26.
|
#include <variable.hpp>
Public Types | |
| using | BaseT = Atom< Meta, ScalarView< Meta, Child >, Child > |
| extract aliases from types above useful for this class | |
| using | SelMatT = linalg::RowVector< T, N > |
| using | TransT = linalg::Vector< T, 1 > |
Public Types inherited from convex::Atom< Meta, ScalarView< Meta, 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 | ScalarView (std::size_t idx_in, const Child &child_in) |
| CTOR. | |
| constexpr | ScalarView (std::size_t idx_in, const Child &child_in, const affine::AffineMap< SelMatT > &map_in) |
| CTOR. | |
| constexpr auto | mul (T alpha) const |
| mul (scalar) | |
| constexpr auto | add (T beta) const |
| add (scalar) | |
| template<AtomType Type, conic::BuilderLike Builder> | |
| constexpr auto | canonicalize_impl (const Builder &builder) const |
| canonicalize | |
Public Member Functions inherited from convex::Atom< Meta, ScalarView< Meta, 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 ScalarView< Meta, Child > & | self () const |
| Return this object as the CRTP-derived atom type. | |
Public Attributes | |
| affine::AffineMap< SelMatT > | map |
| member var | |
| std::size_t | idx |
| index of orig var | |
Public Attributes inherited from convex::Atom< Meta, ScalarView< Meta, Child >, Child > | |
| ChildrenT | children |
| Tuple of normalized child atoms. | |
Static Public Attributes | |
| static constexpr std::size_t | N = dom_size_v<meta_dom_t<atom_meta_t<Child>>> |
Static Public Attributes inherited from convex::Atom< Meta, ScalarView< Meta, 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. | |
Definition at line 74 of file variable.hpp.
| using convex::ScalarView< Meta, Child >::BaseT = Atom<Meta, ScalarView<Meta, Child>, Child> |
extract aliases from types above useful for this class
Definition at line 76 of file variable.hpp.
| using convex::ScalarView< Meta, Child >::SelMatT = linalg::RowVector<T, N> |
Definition at line 82 of file variable.hpp.
| using convex::ScalarView< Meta, Child >::TransT = linalg::Vector<T, 1> |
Definition at line 83 of file variable.hpp.
|
inlineexplicitconstexpr |
CTOR.
| index | |
| child | (var) |
Definition at line 91 of file variable.hpp.
References convex::dom_size_v.
|
inlineexplicitconstexpr |
CTOR.
| index | |
| child | (var) |
| selector | map (linear map onto index) |
Definition at line 105 of file variable.hpp.
References convex::dom_size_v.
|
inlineconstexpr |
add (scalar)
| beta | (scalar) |
Definition at line 132 of file variable.hpp.
References convex::dom_size_v.
|
inlineconstexpr |
canonicalize
| builder | (cone block builder) |
Definition at line 146 of file variable.hpp.
|
inlineconstexpr |
mul (scalar)
| alpha | (scalar that scales var) |
Definition at line 119 of file variable.hpp.
References convex::dom_size_v.
| std::size_t convex::ScalarView< Meta, Child >::idx |
index of orig var
Definition at line 154 of file variable.hpp.
| affine::AffineMap<SelMatT> convex::ScalarView< Meta, Child >::map |
|
staticconstexpr |
Definition at line 80 of file variable.hpp.