Object is initalised with total number of iterations that are expected to occur.
User can then update the object with the add method to indicate how many more iterations
have just occurred.
Every time step * 100 % of iterations have occurred a message is printed to the console.
Use the quiet argument to prevent the object from printing anything at all
stepreal, percentage of iterations to allow before printing the progress to the console
step_currentinteger, the total number of iterations completed since progress was last printed to the console
ninteger, the current number of completed iterations
n_maxinteger, total number of expected iterations to be completed acts as the denominator for calculating progress percentages
quietlogical holds whether or not to print anything
new()Create progressLogger object
progressLogger$new(n_max, quiet = FALSE, step = 0.1)n_maxinteger, sets field n_max
quietlogical, sets field quiet
stepreal, sets field step
add()Records that n more iterations have been completed
this will add that number to the current step count (step_current) and will
print a progress message to the log if the step limit (step) has been reached.
This function will do nothing if quiet has been set to TRUE
progressLogger$add(n)nthe number of successfully complete iterations since add() was last called
print_progress()method to print the current state of progress
progressLogger$print_progress()
clone()The objects of this class are cloneable with this method.
progressLogger$clone(deep = FALSE)deepWhether to make a deep clone.