1#ifndef PROBFD_ALGORITHMS_UTILS_H
2#define PROBFD_ALGORITHMS_UTILS_H
4#include "probfd/value_type.h"
22template <
typename... T>
24 std::tuple<T&...> containers_;
28 : containers_(containers...)
30 assert((containers.empty() && ...));
35 std::apply([](
auto&... c) { (c.clear(), ...); }, containers_);
46 decltype(
auto)
operator()(T&& t)
const
49 return get<n>(std::forward<T>(t));
Helper RAII class that ensures that containers are cleared when going out of scope.
Definition utils.h:23
This namespace contains implementations of SSP search algorithms.
Definition acyclic_value_iteration.h:22
Interval as_interval(value_t lower_bound)
Returns the interval with the given lower bound and infinte upper bound.
bool update(Interval &lhs, Interval rhs, value_t epsilon=g_epsilon)
Intersects two intervals and assigns the result to the left operand.
bool set_min(Interval &lhs, Interval rhs)
Computes the assignments lhs.lower <- min(lhs.lower, rhs.lower) and lower <- min(lhs....
value_t as_lower_bound(Interval interval)
Returns the lower bound of the interval.
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
double value_t
Typedef for the state value type.
Definition aliases.h:7
value_t g_epsilon
The default tolerance value for approximate comparisons.
Represents a closed interval over the extended reals as a pair of lower and upper bound.
Definition interval.h:12
Function object calling std::get<n> on its argument. Useful in ranges algorithms.
Definition utils.h:44