|
Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
|
Progress bar for tracking tasks. More...
#include <monitor.hpp>
Collaboration diagram for trv::sys::ProgressBar:Public Member Functions | |
| ProgressBar (int task_count, std::string name="") | |
| Construct a progress bar. | |
| void | set_bar_width (int bar_width) |
| Set progress bar width. | |
| void | set_nodes (std::vector< float > nodes) |
| Set progress bar width. | |
| void | set_task_idx (int task_idx) |
| Set current (or initial) task index. | |
| void | set_progress (float progress) |
| Set current (or initial) progress value. | |
| void | update (int task_idx_now) |
| Update the progress bar. | |
| void | update (float progress_now) |
| Update the progress bar. | |
Public Attributes | |
| std::string | name |
| progress bar name | |
| int | task_count = 1 |
| total task count | |
| int | task_idx = 0 |
| task index | |
| float | progress = 0. |
| progress value in [0, 1] interval | |
Progress bar for tracking tasks.
Definition at line 583 of file monitor.hpp.
|
explicit |
Construct a progress bar.
| task_count | Total task count (at least 1). |
| name | Progress bar name (default is an empty string). |
Definition at line 524 of file monitor.cpp.
| void trv::sys::ProgressBar::set_bar_width | ( | int | bar_width | ) |
Set progress bar width.
| bar_width | Progress bar width (at least 1). |
Definition at line 537 of file monitor.cpp.
| void trv::sys::ProgressBar::set_nodes | ( | std::vector< float > | nodes | ) |
Set progress bar width.
| nodes | Progress values (strictly increasing in the interval [0, 1]) at which the bar is updated. |
Definition at line 544 of file monitor.cpp.
Here is the caller graph for this function:| void trv::sys::ProgressBar::set_task_idx | ( | int | task_idx | ) |
Set current (or initial) task index.
| task_idx | Current task index within the total task count. |
Definition at line 553 of file monitor.cpp.
Here is the call graph for this function:| void trv::sys::ProgressBar::set_progress | ( | float | progress | ) |
Set current (or initial) progress value.
| progress | Current progress value in the interval [0, 1]. |
Definition at line 566 of file monitor.cpp.
Here is the caller graph for this function:| void trv::sys::ProgressBar::update | ( | int | task_idx_now | ) |
Update the progress bar.
| task_idx_now | Latest completed task index. |
Definition at line 580 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::ProgressBar::update | ( | float | progress_now | ) |
Update the progress bar.
| progress_now | Latest progress value. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 586 of file monitor.cpp.
Here is the call graph for this function:| std::string trv::sys::ProgressBar::name |
progress bar name
Definition at line 585 of file monitor.hpp.
| int trv::sys::ProgressBar::task_count = 1 |
total task count
Definition at line 586 of file monitor.hpp.
| int trv::sys::ProgressBar::task_idx = 0 |
task index
Definition at line 587 of file monitor.hpp.
| float trv::sys::ProgressBar::progress = 0. |
progress value in [0, 1] interval
Definition at line 588 of file monitor.hpp.