8template <Config Conf = DefaultConfig>
15 vec::Constant(n, +
inf<config_t>)} {}
18 return Box{vec::Constant(n, alpaqa::NaN<config_t>),
19 vec::Constant(n, alpaqa::NaN<config_t>)};
22 return Box{std::move(lower), std::move(upper)};
40 return v.binaryExpr(box.
lowerbound, binary_real_f(std::fmax))
41 .binaryExpr(box.
upperbound, binary_real_f(std::fmin));
79 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.
typename Conf::real_t real_t
typename Conf::length_t length_t
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.
static Box from_lower_upper(vec lower, vec upper)
Box(vec lower, vec upper)
static Box NaN(length_t n)