SHOGUN  6.1.3
List of all members | Public Member Functions
ProgressPrinter Class Reference

Detailed Description

Definition at line 72 of file progress.h.

Public Member Functions

 ProgressPrinter (const SGIO &io, float64_t max_value, float64_t min_value, const std::string &prefix, const SG_PRG_MODE mode)
 
 ~ProgressPrinter ()
 
void print_progress () const
 
void print_progress_absolute (float64_t current_val, float64_t val, float64_t min_val, float64_t max_val)
 
void premature_end ()
 
float64_t get_current_progress () const
 

Constructor & Destructor Documentation

◆ ProgressPrinter()

ProgressPrinter ( const SGIO io,
float64_t  max_value,
float64_t  min_value,
const std::string &  prefix,
const SG_PRG_MODE  mode 
)

Creates a ProgressPrinter instance.

Parameters
ioSGIO object which will be used to print the progress bar.
max_valueinterval maximum value.
min_valueinterval minimum value.
prefixstring which will be printed before the progress bar.
modechar mode (UTF8, ASCII etc.).

Definition at line 83 of file progress.h.

◆ ~ProgressPrinter()

Definition at line 93 of file progress.h.

Member Function Documentation

◆ get_current_progress()

float64_t get_current_progress ( ) const
Returns
last progress as a percentage.

Definition at line 157 of file progress.h.

◆ premature_end()

void premature_end ( )

Manually increment to max size the current value to print a complete progress bar.

Definition at line 150 of file progress.h.

◆ print_progress()

void print_progress ( ) const

Increment and print the progress bar. Everything is locked to prevent race conditions or characters overlapping (especially within multi threaded environments).

Definition at line 103 of file progress.h.

◆ print_progress_absolute()

void print_progress_absolute ( float64_t  current_val,
float64_t  val,
float64_t  min_val,
float64_t  max_val 
)

Definition at line 126 of file progress.h.


The documentation for this class was generated from the following file:

SHOGUN Machine Learning Toolbox - Documentation