progress#
This is a small submodule which serves no other purpose other than to fill the command line with colored garbage an emojis to indicate how screwed your solution is getting over the course of iterations.
About the only noteworthy thing in it is the type ProgressTracker
,
which contains state about where the solver stated, when it should stop
and what is the current state. It also has methods that allow it to
have pretty terminal output.
- class mfv2d.progress.ProgressTracker(err_tol: float, err_initial: float, err_cur: float, iter_max: int, iter_cur: int = 0, iter_width: int = 10, err_width: int = 10)[source]#
Type for progress tracking.
- state_str(format_string: str) str [source]#
Get a string with current state.
- Parameters:
format_string (str) – String that will be formatted with
str.format()
method. It will receive the spinner character, the iteration progress bar and error indicator bar in that order.- Returns:
Formatted string.
- Return type: