10template <Config Conf = DefaultConfig>
40 return v.cwiseMax(
box.lowerbound).cwiseMin(
box.upperbound);
78 return d.dot(Σ.cwiseProduct(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)