9#include "akreon/linalg/assert.hpp"
21template <
typename Meta,
typename Derived,
typename... Cs>
70 "Mismatch in size between parent domain and child codomain");
77 "Function with unknown monotonicity requires affine child");
111 "Function composition fails DCP compliance");
129 "Set expects child to be a variable type");
140 "Parent positive domain expects positive child codomain");
146 "Parent non-negative domain expects "
147 "positive/non-negative child codomain");
152 "Parent negative domain expects negative child codomain");
158 "Parent non-positive domain expects "
159 "non-positive/negative child codomain");
164 "Parent PSD domain expects PSD child codomain");
177 "Intersection expects each child to be a set or "
184 "Minkowski sum is not supported for set children");
210 "Not dcp valid to sum convex with concave atoms");
226 template <AtomType Type, conic::BuilderLike Builder>
237 return static_cast<const Derived&
>(*this);
VarType
Domain/variable annotation attached to domains/codomains.
constexpr std::size_t dom_size_v
CurvatureType
Curvature annotation for atom codomain.
constexpr CurvatureType meta_curv_v
constexpr bool is_set_type_v
typename dom_traits< linalg::remove_cvref_t< Dom > >::T dom_type_t
constexpr bool is_fn_type_v
Helper predicates on atom category.
constexpr bool is_add_type_v
typename dom_traits< linalg::remove_cvref_t< Dom > >::Point dom_point_t
constexpr bool is_cap_type_v
typename meta_traits< linalg::remove_cvref_t< Meta > >::Codomain meta_codom_t
typename atom_traits< atom_decay_t< Atom > >::ConvexMeta atom_meta_t
Extract metadata type from atom.
constexpr VarType dom_vartype_v
constexpr bool is_var_type_v
typename meta_traits< linalg::remove_cvref_t< Meta > >::Domain meta_dom_t
CRTP base for convex atoms.
meta_codom_t< Meta > Codomain
Atom output codomain.
constexpr void validate_domain() const
Validate child domains, signs, curvature, and composition rules.
static constexpr VarType CodomSign
Codomain sign declared by atom metadata.
constexpr Atom(ChildrenT child_in)
Construct an atom with normalized children.
static constexpr std::size_t M
Codomain dimension.
ChildrenT children
Tuple of normalized child atoms.
std::tuple< atom_decay_t< Cs >... > ChildrenT
Tuple of decayed child atom types.
constexpr const Derived & self() const
Return this object as the CRTP-derived atom type.
dom_point_t< Domain > PointT
Point type accepted by the atom domain.
static constexpr VarType DomSign
Domain sign declared by atom metadata.
constexpr Atom()
Construct a leaf atom with no children.
constexpr auto canonicalize(const Builder &builder) const
Dispatch canonicalization to the derived atom.
constexpr void validate_fn_domain(const auto &child) const
Validate DCP composition for a function child.
meta_dom_t< Meta > Domain
Atom input domain.
dom_type_t< Domain > T
Scalar field for the atom domain.
static constexpr std::size_t N
Domain dimension.
static constexpr CurvatureType Curvature
Curvature declared by atom metadata.