autoppl
v0.8
A C++ template library for probabilistic programming
|
#include <logging.hpp>
Public Member Functions | |
ProgressLogger (size_t max, const std::string &name, std::ostream &os=std::cout) | |
~ProgressLogger () | |
void | printProgress (size_t step) |
ProgressLogger prints a visual progress bar counting towards 100% completion of an algorithm or task (really, any for loop).
This prints directly to the output stream provided in the constructor, and no print statements should be made in the period between calls to printProgress.
|
inline |
Constructs a ProgressLogger object.
max | the value being counted towards, e.g. the upper-bound of the for-loop |
name | string to print alongside the progress bar |
|
inline |
When the logger goes out of scope, append a new line
|
inline |