This class collects all loggers that are used in the algorithm and takes care about stopping strategies and tracing.
Format
S4 object.
Usage
LoggerList$new()
Methods
$registerLogger()
:Logger* -> ()
$printRegisteredLogger()
:() -> ()
$clearRegisteredLogger()
:() -> ()
$getNumberOfRegisteredLogger()
:() -> integer(1)
$getNamesOfRegisteredLogger()
:() -> character()
$isStopper()
:() -> logical()
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