1#ifndef PROBFD_PROGRESS_REPORT_H
2#define PROBFD_PROGRESS_REPORT_H
4#include "probfd/interval.h"
5#include "probfd/value_type.h"
16using Printer = std::function<void(std::ostream&)>;
34 struct BoundPropertyInfo {
37 std::optional<Interval> last_printed = std::nullopt;
40 const std::optional<value_t> tolerance_;
44 std::vector<BoundPropertyInfo> bound_infos_;
45 std::vector<Printer> additional_informations_;
58 std::optional<value_t> tolerance = std::nullopt,
59 std::ostream& out = std::cout,
101 void print_progress();
102 bool advance_values(
bool force =
false);
A registry for print functions related to search progress.
Definition progress_report.h:33
void force_print()
Prints the output to the internal output stream, even if disabled and a bound change tolerance is set...
void print()
Prints the output to the internal output stream, if enabled.
void enable()
Enables printing.
void register_bound(const std::string &property_name, BoundProperty property)
Appends a new bound property with a given name to the list of bound properties to be printed when the...
void disable()
Disables printing.
void register_print(Printer f)
Appends a new printer to the list of printers.
ProgressReport(std::optional< value_t > tolerance=std::nullopt, std::ostream &out=std::cout, bool enabled=true)
Construct a new progress report.
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8
std::function< Interval()> BoundProperty
A function that produces a state value bound.
Definition progress_report.h:19
std::function< void(std::ostream &)> Printer
A function that prints something to an output stream.
Definition progress_report.h:16
Represents a closed interval over the extended reals as a pair of lower and upper bound.
Definition interval.h:12