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>
107 const auto alpha = lift_map.linear_part()(0, 0);
108 const auto beta = lift_map.translation()(0);
109 AK_ASSERT(x(0) >
T(0) &&
"Invalid domain for 1/x");
112 return alpha / x(0) + beta;
114 return T(-1) *
alpha / x(0) + 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());
134 std::get<0>(this->children),
new_map);
137 affine::AffineMap<LiftedVarMat<T>>
new_map(
138 Scalar * lift_map.linear_part(), lift_map.translation());
150 constexpr auto add(
T beta)
const {
152 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 F = linalg::set_block<1, 2, 0, Dom>(
F,
child_coord.linear_part());
195 linalg::Vector<T, 3>
g;
196 g(0) = linalg::sqrt2_v<T>;
205 const auto rsoc_coords = affine::AffineMap<decltype(F)>(
F,
g);
209 const auto cones = std::make_tuple(
rsoc);
220template <
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 - inv pos fn
dom_space_t< meta_dom_t< Meta > > Space
alias to extract space type
constexpr auto mul() const
mul
constexpr T eval(const PointT &x) const
eval impl
affine::AffineMap< LiftedVarMat< T > > lift_map
member vars
constexpr auto add(T beta) const
add
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize_impl
constexpr MonotonicityType monotonicity() const
mono
constexpr InvPos(const Child &child_in)
CTOR.
constexpr T operator()(const PointT &x) const
eval via operator overload
constexpr InvPos(const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in)
CTOR.