This class is meant to define all logger which should be used to track the progress of the algorithm.

Format

S4 object.

Usage

LoggerList$new()

Fields

This class doesn't contain public fields.

Methods

clearRegisteredLogger()

Removes all registered logger from the list. The used logger are not deleted, just removed from the map.

getNamesOfRegisteredLogger()

Returns the registered logger names as character vector.

getNumberOfRegisteredLogger()

Returns the number of registered logger as integer.

printRegisteredLogger()

Prints all registered logger.

registerLogger(logger)

Includes a new logger into the logger list with the logger_id as key.

Examples

# Define logger: log_iters = LoggerIteration$new("iteration", TRUE, 100) log_time = LoggerTime$new("time", FALSE, 20, "minutes") # Create logger list: logger_list = LoggerList$new() # Register new loggeR: logger_list$registerLogger(log_iters) logger_list$registerLogger(log_time) # Print registered logger: logger_list$printRegisteredLogger()
#> Registered Logger: #> >>iteration<< Logger #> >>time<< Logger
# Remove all logger: logger_list$clearRegisteredLogger() # Get number of registered logger: logger_list$getNumberOfRegisteredLogger()
#> [1] 0