13template <linalg::RnSpace Space>
17template <linalg::RnSpace Space>
21template <linalg::RnSpace Space>
34template <
typename Meta,
typename Child, HalfspaceType Type>
68 return linalg::inner_product(
a, x) >=
b;
71 return linalg::inner_product(
a, x) <=
b;
82 if (linalg::all_zero(
a)) {
84 if (
b <
T(0))
return false;
86 if (
b >
T(0))
return false;
105 template <linalg::SquareMatrix Mat>
106 requires(std::same_as<T, linalg::matrix_scalar_t<Mat>> &&
107 linalg::mat_cols_v<Mat> ==
N)
109 const auto [
U_inv, event] = linalg::MatrixInverse<Mat>()(map.linear_part());
110 static_cast<void>(event);
113 b + (
aT_U * map.translation())(0),
114 std::get<0>(
this->children));
122 template <
typename Other>
137 template <AtomType AType, conic::BuilderLike Builder>
145 linalg::mat_cols_v<
decltype(
child_coord.linear_part())>;
147 "Convex set domain does not equal the child coordinate "
148 "linear map's codomain in size");
150 linalg::RowVector<T, N>
F;
151 F = linalg::set_block<0, 1, 0, N>(
F,
T(-1) * linalg::as_row_vector(
a));
152 linalg::Vector<T, 1>
g{
b};
153 const auto map = affine::AffineMap<decltype(F)>(
F,
g);
155 const auto cones = std::make_tuple(
rplus);
constexpr std::size_t dom_size_v
Atom-local canonical emission bundle.
forward decl for nonneg orthant cone
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 of convex set
forward declaration of halfspace
constexpr auto canonicalize_set(const Builder &builder) const
canonicalize impl
constexpr Halfspace(const PointT &a_in, T b_in, const Child &child_in)
CTOR for halfspace set.
PointT a
member variables in the halfspace
constexpr auto transform_impl(const affine::AffineMap< Mat > &map) const
transform halfspace by affine map
constexpr bool contains_impl(const PointT &x, T) const
contains function to see if x is in the halfspace a^T x <= b
constexpr bool is_well_formed() const
is_well_formed checks to see if underlying set is a valid convex set
constexpr bool is_equal_impl(const Other &other) const
is_equal implementation