14template <linalg::RnSpace Space>
15 requires(linalg::space_dim_v<Space> == 1)
19template <linalg::RnSpace Space>
20 requires(linalg::space_dim_v<Space> == 1)
24template <linalg::RnSpace Space>
25 requires(linalg::space_dim_v<Space> == 1)
29template <linalg::RnSpace Space>
34template <linalg::RnSpace Space>
43template <
typename Meta,
typename Child>
121 const auto alpha = lift_map.linear_part()(0, 0);
122 const auto beta = lift_map.translation()(0);
124 return alpha * linalg::constexpr_abs(x(0)) + beta;
125 else return T(-1) *
alpha * linalg::constexpr_abs(x(0)) + beta;
134 constexpr auto mul()
const {
135 if constexpr (Scalar <
T(0)) {
136 const auto alpha =
T(-1) * Scalar;
137 affine::AffineMap<LiftedVarMat<T>>
new_map(
alpha * lift_map.linear_part(),
138 lift_map.translation());
146 affine::AffineMap<LiftedVarMat<T>>
new_map(
147 Scalar * lift_map.linear_part(), lift_map.translation());
159 constexpr auto add(
T beta)
const {
161 affine::AffineMap<LiftedVarMat<T>>
new_map(lift_map.linear_part(),
bias);
215 template <AtomType Type, conic::BuilderLike Builder>
218 std::get<0>(this->children)
223 static constexpr std::size_t Dom = linalg::mat_cols_v<AffineMatT>;
224 static constexpr std::size_t Codom = linalg::mat_rows_v<AffineMatT>;
225 static_assert(Codom == 1,
226 "input affine map from cone block has invalid codom dim for "
227 "scalar fn domain (i.e., != 1");
228 linalg::Matrix<T, 5, Dom + 2>
F;
229 F = linalg::set_block<0, 1, 0, Dom>(
F,
child_coord.linear_part());
230 F = linalg::set_block<1, 2, 0, Dom>(
F,
T(-1) *
child_coord.linear_part());
236 linalg::Vector<T, 5>
g;
241 F(2, Dom + 1) =
T(1);
242 F(4, Dom + 1) =
T(1);
244 F(2, Dom + 1) =
T(-1);
245 F(4, Dom + 1) =
T(-1);
262template <
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.
forward decl for nonneg orthant cone
forward declaration - abs fn
constexpr Abs(const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in)
CTOR.
constexpr Abs(const Child &child_in)
CTOR.
constexpr auto mul() const
mul
dom_space_t< meta_dom_t< Meta > > Space
alias to extract space type
constexpr T eval(const PointT &x) const
eval impl
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize_impl
constexpr T operator()(const PointT &x) const
eval via operator overload
affine::AffineMap< LiftedVarMat< T > > lift_map
member vars
constexpr MonotonicityType monotonicity() const
mono
constexpr auto add(T beta) const
add
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.