12template <
typename Scalar>
struct FilterTpl {
24 FilterTpl(
const Scalar &beta,
const Scalar &alpha_min,
25 const std::size_t &max_num_steps) {
35 const std::size_t &max_num_steps) {
42 Scalar
run(
const std::function<std::pair<Scalar, Scalar>(Scalar)> &phi,
45 std::pair<Scalar, Scalar> fpair;
49 fpair = phi(alpha_try);
51 }
catch (
const std::runtime_error &e) {
66 fpair = phi(alpha_try);
69 fpair = phi(alpha_try);
81 std::pair<Scalar, Scalar> element = *el;
82 if (element.first +
beta_ * element.second <= fpair.first and
83 element.second +
beta_ * element.second <= fpair.second) {
90 std::pair<Scalar, Scalar> element = *el;
91 if (fpair.first <= element.first and fpair.second <= element.second) {
106#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
107#include "./filter.txx"
bool accept_pair(const std::pair< Scalar, Scalar > &fpair)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
std::vector< std::pair< Scalar, Scalar > > filter_pairs_
Scalar run(const std::function< std::pair< Scalar, Scalar >(Scalar)> &phi, Scalar &alpha_try)
std::size_t max_num_steps_
FilterTpl(const Scalar &beta, const Scalar &alpha_min, const std::size_t &max_num_steps)
virtual ~FilterTpl()=default
void resetFilter(const Scalar &beta, const Scalar &alpha_min, const std::size_t &max_num_steps)