15template <linalg::RnSpace Space>
16 requires(linalg::space_dim_v<Space> == 1)
20template <linalg::RnSpace Space>
21 requires(linalg::space_dim_v<Space> == 1)
25template <linalg::RnSpace Space>
26 requires(linalg::space_dim_v<Space> == 1)
30template <linalg::RnSpace Space>
35template <linalg::RnSpace Space>
45template <
typename Meta,
typename Child>
123 const auto alpha = lift_map.linear_part()(0, 0);
124 const auto beta = lift_map.translation()(0);
126 return alpha * x(0) * x(0) + beta;
127 else return T(-1) *
alpha * x(0) * x(0) + beta;
136 constexpr auto mul()
const {
137 if constexpr (Scalar <
T(0)) {
138 const auto alpha =
T(-1) * Scalar;
139 affine::AffineMap<LiftedVarMat<T>>
new_map(
alpha * lift_map.linear_part(),
140 lift_map.translation());
146 std::get<0>(this->children),
new_map);
149 affine::AffineMap<LiftedVarMat<T>>
new_map(
150 Scalar * lift_map.linear_part(), lift_map.translation());
162 constexpr auto add(
T beta)
const {
164 affine::AffineMap<LiftedVarMat<T>>
new_map(lift_map.linear_part(),
bias);
194 template <AtomType Type, conic::BuilderLike Builder>
197 std::get<0>(this->children)
202 static constexpr std::size_t Dom = linalg::mat_cols_v<AffineMatT>;
203 static constexpr std::size_t Codom = linalg::mat_rows_v<AffineMatT>;
204 static_assert(Codom == 1,
205 "input affine map from cone block has invalid codom dim for "
206 "scalar fn domain (i.e., != 1");
207 linalg::Matrix<T, 3, Dom + 1>
F{};
208 F = linalg::set_block<0, 1, 0, Dom>(
F,
child_coord.linear_part());
209 linalg::Vector<T, 3>
g{};
219 const auto rsoc_coords = affine::AffineMap<decltype(F)>(
F,
g);
223 const auto cones = std::make_tuple(
rsoc);
235template <
typename Child>
VarType
Domain/variable annotation attached to domains/codomains.
typename dom_traits< linalg::remove_cvref_t< Dom > >::Space dom_space_t
constexpr std::size_t dom_size_v
CurvatureType
Curvature annotation for atom codomain.
linalg::remove_cvref_t< T > atom_decay_t
normalize atom-facing types to a stable internal form.
MonotonicityType
Monotonicity annotation for function atoms.
linalg::Vector< T, 1 > LiftedVarBias
alias for lifted var map
linalg::RowVector< T, 1 > LiftedVarMat
alias for lifted var map
Atom-local canonical emission bundle.
CRTP base for convex atoms.
dom_point_t< Domain > PointT
Point type accepted by the atom domain.
dom_type_t< Domain > T
Scalar field for the atom domain.
Domain wrapper with a static sign label.
forward declaration - square fn
constexpr Square(const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in)
CTOR.
dom_space_t< meta_dom_t< Meta > > Space
alias to extract space type
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize_impl
constexpr auto mul() const
mul
constexpr auto add(T beta) const
add
constexpr T operator()(const PointT &x) const
eval via operator overload
constexpr T eval(const PointT &x) const
eval impl
affine::AffineMap< LiftedVarMat< T > > lift_map
member vars
constexpr Square(const Child &child_in)
CTOR.
constexpr MonotonicityType monotonicity() const
mono