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>
47template <
typename Meta,
typename Child>
109 AK_ASSERT(x(0) >
T(0) &&
"Invalid domain for log(x)");
111 const auto alpha = lift_map.linear_part()(0, 0);
112 const auto beta = lift_map.translation()(0);
114 return alpha * linalg::constexpr_ln(x(0)).value() + beta;
115 else return T(-1) *
alpha * linalg::constexpr_ln(x(0)).value() + beta;
124 constexpr auto mul()
const {
125 if constexpr (Scalar <
T(0)) {
126 const auto alpha =
T(-1) * Scalar;
127 affine::AffineMap<LiftedVarMat<T>>
new_map(
alpha * lift_map.linear_part(),
128 lift_map.translation());
136 affine::AffineMap<LiftedVarMat<T>>
new_map(
137 Scalar * lift_map.linear_part(), lift_map.translation());
149 constexpr auto add(
T beta)
const {
151 affine::AffineMap<LiftedVarMat<T>>
new_map(lift_map.linear_part(),
bias);
180 template <AtomType Type, conic::BuilderLike Builder>
183 std::get<0>(this->children)
188 static constexpr std::size_t Dom = linalg::mat_cols_v<AffineMatT>;
189 static constexpr std::size_t Codom = linalg::mat_rows_v<AffineMatT>;
190 static_assert(Codom == 1,
191 "input affine map from cone block has invalid codom dim for "
192 "scalar fn domain (i.e., != 1");
193 linalg::Matrix<T, 3, Dom + 1>
F;
194 linalg::Vector<T, 3>
g;
195 F = linalg::set_block<2, 3, 0, Dom>(
F,
child_coord.linear_part());
207 const auto cones = std::make_tuple(
exp_cone);
219template <
typename Child>
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 - log fn
constexpr auto add(T beta) const
add
constexpr auto mul() const
mul
constexpr MonotonicityType monotonicity() const
mono
constexpr T operator()(const PointT &x) const
eval via operator overload
dom_space_t< meta_dom_t< Meta > > Space
alias to extract space type
constexpr Log(const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in)
CTOR.
constexpr T eval(const PointT &x) const
eval impl
constexpr Log(const Child &child_in)
CTOR.
affine::AffineMap< LiftedVarMat< T > > lift_map
member vars
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize_impl