16template <linalg::RnSpace Space>
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 Dom, linalg::RnSpace Codom>
35template <linalg::RnSpace Dom, linalg::RnSpace Codom>
48template <
typename Meta,
typename Child>
110 std::for_each(x.begin(), x.end(), [&](
const auto&
pt) { prod *= pt; });
112 const auto beta =
lift_map.translation()(0);
114 return T(-1) *
alpha * linalg::constexpr_nrt_safe<T>(
prod,
N) + beta;
115 else return alpha * linalg::constexpr_nrt_safe<T>(
prod,
N) + beta;
124 constexpr auto mul()
const {
125 if constexpr (Scalar <
T(0)) {
128 const auto alpha =
T(-1) * Scalar;
139 affine::AffineMap<LiftedVarMat<T>>
new_map(
152 constexpr auto add(
T beta)
const {
179 template <AtomType Type, conic::BuilderLike Builder>
187 static constexpr std::size_t Dom = linalg::mat_cols_v<AffineMatT>;
188 static constexpr std::size_t Codom = linalg::mat_rows_v<AffineMatT>;
189 static_assert(Codom ==
N,
190 "input affine map from cone block has invalid dom which is a "
191 "mismatch between domain in the convex function");
192 linalg::Matrix<T, N + 1, Dom + 1>
F;
193 F = linalg::set_block<0, N, 0, Dom>(
F,
child_coord.linear_part());
194 linalg::Vector<T, N + 1>
g;
204 const linalg::vector_traits<linalg::Vector<T, N>>
vec_t;
207 const auto cones = std::make_tuple(
power_cone);
219template <
typename Child>
223 linalg::Matrix<dom_type_t<meta_codom_t<atom_meta_t<Child>>>, 1, 1>>,
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.
ChildrenT children
Tuple of normalized child atoms.
dom_point_t< Domain > PointT
Point type accepted by the atom domain.
dom_type_t< Domain > T
Scalar field for the atom domain.
static constexpr std::size_t N
Domain dimension.
Domain wrapper with a static sign label.
forward declaration - geo mean fn
constexpr GeoMean(const Child &child_in)
CTOR.
constexpr T eval(const PointT &x) const
evaluation impl
constexpr MonotonicityType monotonicity() const
mono
constexpr auto mul() const
mul
constexpr GeoMean(const Child &child_in, const affine::AffineMap< LiftedVarMat< T > > &map_in)
CTOR.
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize_impl
constexpr auto add(T beta) const
add
affine::AffineMap< LiftedVarMat< T > > lift_map
member vars
static constexpr CurvatureType Tag
curvature tag
dom_space_t< meta_dom_t< Meta > > Space
alias to extract space type
constexpr T operator()(const PointT &x) const
eval via operator overload