8#include "akreon/linalg/assert.hpp"
10#include "akreon/linalg/affine/affine_map.hpp"
13#include "akreon/linalg/vector/algebra_util.hpp"
24template <
typename Meta,
typename Derived,
typename Child>
32 "Convex set assumes variable in its domain");
51 "ConvexSet::validate_domain_impl expects set it to be good");
63 return self().contains_impl(x,
tol);
76 template <linalg::MatrixContainer Mat>
77 constexpr auto transform(
const affine::AffineMap<Mat>& map)
const {
78 return self().transform_impl(map);
88 template <
typename OtherDerived,
typename OtherChild>
91 return self().is_equal_impl(
other.self());
101 template <
typename OtherDerived,
typename OtherChild>
104 return !
self().is_equal_impl(
other.self());
114 template <AtomType Type, conic::BuilderLike Builder>
124 constexpr auto self()
const {
return static_cast<const Derived&
>(*this); }
constexpr std::size_t dom_size_v
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.
forward declaration of convex set
constexpr auto self() const
self function which returns a const ref to the derived object
constexpr void validate_domain_impl() const
is_well_formed
constexpr bool operator!=(const ConvexSet< Meta, OtherDerived, OtherChild > &other) const
inequality comparison overload
constexpr bool contains(const PointT &x, T tol=1e-8) const
contains to check if the point lies in the convex set
constexpr bool operator==(const ConvexSet< Meta, OtherDerived, OtherChild > &other) const
equality comparison overload
constexpr auto transform(const affine::AffineMap< Mat > &map) const
transform convex set by affine map
constexpr auto canonicalize_impl(const Builder &builder) const
canonicalize
constexpr ConvexSet(const Child &child_in)
CTOR.