ARTS  2.4.0(git:4fb77825)
oem::ArtsLog< type > Class Template Reference

OEM log output. More...

#include <oem.h>

Public Member Functions

 ArtsLog (unsigned int v, ::Vector &g, bool l=false)
 Create log. More...
 
 ~ArtsLog ()
 Finalizes log output if necessary. More...
 
template<typename... Params>
void init (Params &... params)
 Initialize log output. More...
 
template<typename... Params>
void step (const Params &... params)
 Print step to command line. More...
 
template<typename... Params>
void finalize (const Params &... params)
 Finalize log output. More...
 
template<typename... Params>
void time (const Params &... params)
 Print timing information to command line. More...
 

Private Attributes

int verbosity_
 Verbosity level of logger. More...
 
Vector gamma_history_
 Reference to ARTS vector holding the LM gamma history. More...
 
Numeric scaling_factor_ = 0.0
 Scaling factor for the cost. More...
 
Numeric start_cost_ = 0.0
 Start cost (not computed by invlib) More...
 
bool linear_ = false
 Flag indicating whether forward model is linear. More...
 
bool finalized_ = false
 Flag indicating whether output has been finalized. More...
 

Detailed Description

template<invlib::LogType type>
class oem::ArtsLog< type >

OEM log output.

This class takes care of formatting the OEM iteration information and displaying in the command line.

Template Parameters
Theinvlib log type defining which type of logging to perform.

Definition at line 244 of file oem.h.

Constructor & Destructor Documentation

◆ ArtsLog()

template<invlib::LogType type>
oem::ArtsLog< type >::ArtsLog ( unsigned int  v,
::Vector g,
bool  l = false 
)
inline

Create log.

Parameters
verbosityVerbosity level 0 for silent, 2 for verbose
gamma_historyReference to vector in which to store gamma values of LM iteration
linearFlag indicating whether forward model is linear.

Definition at line 253 of file oem.h.

◆ ~ArtsLog()

template<invlib::LogType type>
oem::ArtsLog< type >::~ArtsLog ( )
inline

Finalizes log output if necessary.

Definition at line 257 of file oem.h.

References oem::ArtsLog< type >::finalized_, and oem::ArtsLog< type >::verbosity_.

Member Function Documentation

◆ finalize()

template<invlib::LogType type>
template<typename... Params>
void oem::ArtsLog< type >::finalize ( const Params &...  params)
inline

Finalize log output.

This function is called from within invlib to finalize the log output.

Definition at line 351 of file oem.h.

References oem::ArtsLog< type >::finalized_, oem::ArtsLog< type >::linear_, oem::ArtsLog< type >::scaling_factor_, and oem::ArtsLog< type >::verbosity_.

◆ init()

template<invlib::LogType type>
template<typename... Params>
void oem::ArtsLog< type >::init ( Params &...  params)
inline

Initialize log output.

This function is called from within invlib to initialize the log output. Prints general information on the OEM settings.

Definition at line 273 of file oem.h.

References oem::ArtsLog< type >::scaling_factor_, oem::ArtsLog< type >::verbosity_, and ARTS::Var::y().

◆ step()

template<invlib::LogType type>
template<typename... Params>
void oem::ArtsLog< type >::step ( const Params &...  params)
inline

Print step to command line.

This function is called from invlib to log a new step to the command line.

Definition at line 319 of file oem.h.

References oem::ArtsLog< type >::gamma_history_, oem::ArtsLog< type >::start_cost_, and oem::ArtsLog< type >::verbosity_.

◆ time()

template<invlib::LogType type>
template<typename... Params>
void oem::ArtsLog< type >::time ( const Params &...  params)
inline

Print timing information to command line.

Definition at line 378 of file oem.h.

References oem::ArtsLog< type >::verbosity_.

Member Data Documentation

◆ finalized_

template<invlib::LogType type>
bool oem::ArtsLog< type >::finalized_ = false
private

Flag indicating whether output has been finalized.

Definition at line 407 of file oem.h.

Referenced by oem::ArtsLog< type >::finalize(), and oem::ArtsLog< type >::~ArtsLog().

◆ gamma_history_

template<invlib::LogType type>
Vector oem::ArtsLog< type >::gamma_history_
private

Reference to ARTS vector holding the LM gamma history.

Definition at line 399 of file oem.h.

Referenced by oem::ArtsLog< type >::step().

◆ linear_

template<invlib::LogType type>
bool oem::ArtsLog< type >::linear_ = false
private

Flag indicating whether forward model is linear.

Definition at line 405 of file oem.h.

Referenced by oem::ArtsLog< type >::finalize().

◆ scaling_factor_

template<invlib::LogType type>
Numeric oem::ArtsLog< type >::scaling_factor_ = 0.0
private

Scaling factor for the cost.

Definition at line 401 of file oem.h.

Referenced by oem::ArtsLog< type >::finalize(), and oem::ArtsLog< type >::init().

◆ start_cost_

template<invlib::LogType type>
Numeric oem::ArtsLog< type >::start_cost_ = 0.0
private

Start cost (not computed by invlib)

Definition at line 403 of file oem.h.

Referenced by oem::ArtsLog< type >::step().

◆ verbosity_

template<invlib::LogType type>
int oem::ArtsLog< type >::verbosity_
private

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