10template <Config Conf = DefaultConfig>
20 return Box{vec::Constant(n, alpaqa::NaN<config_t>),
21 vec::Constant(n, alpaqa::NaN<config_t>)};
24 return Box{std::move(lower), std::move(upper)};
78 return d.dot(Σ.asDiagonal() * d);
#define USING_ALPAQA_CONFIG(Conf)
auto projecting_difference(const auto &v, const Box< Conf > &box)
Get the difference between the given vector and its projection.
auto project(const auto &v, const Box< Conf > &box)
Project a vector onto a box.
auto dist_squared(const auto &v, const Box< Conf > &box)
Get the distance squared between the given vector and its projection.
typename Conf::real_t real_t
typename Conf::length_t length_t
static Box from_lower_upper(vec lower, vec upper)
Box(vec lower, vec upper)
static Box NaN(length_t n)