Loggers

Abstract Types

RLinearAlgebra.LoggerType
Logger

An abstract supertype for structures that record the progress of a SolverRecipe applied to a coefficient matrix and constant vector.

source
RLinearAlgebra.LoggerRecipeType
LoggerRecipe

An abstract supertype for a structure that contains pre-allocated memory for a method that records the progress of a SolverRecipe.

source

Logger Structures

RLinearAlgebra.BasicLoggerType
BasicLogger <: Logger

This is a mutable struct that contains the max_it parameter and stores the error metric in a vector. Checks convergence of the solver based on the log information.

Fields

  • max_it::Int64, The maximum number of iterations for the solver. If not specified by the user, it is set to 3 times the number of rows in the matrix.
  • threshold_info::Union{Float64, Tuple}, The parameters used for stopping the algorithm.
  • collection_rate::Int64, the rate that history is gathered. (Note: The last value is always recorded.)
  • stopping_criterion::Function, function that evaluates the stopping criterion.
source
RLinearAlgebra.BasicLoggerRecipeType
BasicLoggerRecipe <: LoggerRecipe

This is a mutable struct that contains the max_it parameter and stores the error metric in a vector. Checks convergence of the solver based on the log information.

Fields

  • max_it::Int64, The maximum number of iterations for the solver.
  • error::Float64, The current error metric.
  • threshold_info::Union{Float64, Tuple}, The parameters used for stopping the algorithm.
  • iteration::Int64, the current iteration of the solver.
  • record_location::Int64, the location in the history vector of the most recent entry.
  • collection_rate::Int64, the rate that history is gathered. (Note: The last value is always recorded.)
  • converged::Bool, A boolean indicating whether the stopping criterion is satisfied.
  • StoppingCriterion::Function, function that evaluates the stopping criterion.
  • hist:AbstractVector, vector that contains the history of the error metric.
source

Exported Functions

RLinearAlgebra.complete_loggerFunction
complete_logger(logger::Logger)

A function that generates a LoggerRecipe given the arguments.

Arguments

  • logger::Logger, a user-specified logging method.

Returns

  • A LoggerRecipe object.
source
RLinearAlgebra.update_logger!Function
update_logger!(logger::LoggerRecipe, err::Float64, iteration::Int64)

A function that updates the LoggerRecipe in place given arguments.

Arguments

  • logger::LoggerRecipe, a fully initialized realization for a logging method for a specific linear or least squares solver.
  • err::Real, an error value to be logged.
  • iteration::Int64, the iteration of the solver.

Returns

  • Performs an inplace update to the LoggerRecipe and returns nothing.
source
RLinearAlgebra.reset_logger!Function
reset_logger!(logger::LoggerRecipe)

A function that resets the LoggerRecipe in place.

Arguments

  • logger::LoggerRecipe, a fully initialized realization for a logging method for a specific linear or least squares solver.

Returns

  • Performs an inplace update to the LoggerRecipe and returns nothing.
source
RLinearAlgebra.threshold_stopFunction
threshold_stop(log::BasicLoggerRecipe)

Function that takes an input threshold and stops when the most recent entry in the history vector is less than the threshold.

Arguments

  • log::LoggerRecipe, a structure containing the logger information

Bool

  • Returns a Bool indicating if the stopping threshold is satisfied.
source