bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::utils::IterativeAlgorithmController Class Reference

Controller for iterative algorithms. More...

#include <iterative_algorithm_controller.h>

Public Member Functions

 IterativeAlgorithmController (uint_t maxIterations, real_t exitTolerance)
 Constructor.
 
 IterativeAlgorithmController (const IterativeAlgorithmController &)=default
 Copy constructor.
 
 IterativeAlgorithmController (IterativeAlgorithmController &&)=default
 Move copy constructor.
 
IterativeAlgorithmControlleroperator= (const IterativeAlgorithmController &)=default
 copy assignement
 
IterativeAlgorithmControlleroperator= (IterativeAlgorithmController &&)=default
 move copy assignement
 
 ~IterativeAlgorithmController ()=default
 Destructor.
 
bool continue_iterations ()
 Returns true if the iterations of the algorithm should be continued.
 
bool show_iterations () const
 show iterations
 
bool track_residuals () const
 track_residuals
 
void set_tolerance (real_t tol)
 set_tolerance
 
void set_show_iterations_flag (bool flag)
 show iterations
 
void set_track_residuals_flag (bool flag)
 set_track_residuals_flag
 
void set_num_threads (uint_t nthreads)
 Set the number of threads.
 
void set_max_itrs (uint_t max_itrs)
 set_max_itrs
 
uint_t get_current_iteration () const
 Returns the current iteration index.
 
real_t get_exit_tolerance () const
 Returns the exit tolerance for the algorithm.
 
uint_t get_max_iterations () const
 Return the maximum number of iterations.
 
uint_t get_num_threads () const
 Get the number of threads used.
 
real_t get_residual () const
 get_residual
 
IterativeAlgorithmResult get_state () const
 Returns the state of the controller.
 
void update_residual (real_t res)
 Update the residual.
 
void reset (const IterativeAlgorithmController &control)
 reset
 
void reset ()
 reset
 

Detailed Description

Controller for iterative algorithms.

Constructor & Destructor Documentation

◆ IterativeAlgorithmController() [1/3]

bitrl::utils::IterativeAlgorithmController::IterativeAlgorithmController ( uint_t  maxIterations,
real_t  exitTolerance 
)
inline

Constructor.

◆ IterativeAlgorithmController() [2/3]

bitrl::utils::IterativeAlgorithmController::IterativeAlgorithmController ( const IterativeAlgorithmController )
default

Copy constructor.

◆ IterativeAlgorithmController() [3/3]

bitrl::utils::IterativeAlgorithmController::IterativeAlgorithmController ( IterativeAlgorithmController &&  )
default

Move copy constructor.

◆ ~IterativeAlgorithmController()

bitrl::utils::IterativeAlgorithmController::~IterativeAlgorithmController ( )
default

Destructor.

Member Function Documentation

◆ continue_iterations()

bool bitrl::utils::IterativeAlgorithmController::continue_iterations ( )

Returns true if the iterations of the algorithm should be continued.

◆ get_current_iteration()

uint_t bitrl::utils::IterativeAlgorithmController::get_current_iteration ( ) const
inline

Returns the current iteration index.

◆ get_exit_tolerance()

real_t bitrl::utils::IterativeAlgorithmController::get_exit_tolerance ( ) const
inline

Returns the exit tolerance for the algorithm.

◆ get_max_iterations()

uint_t bitrl::utils::IterativeAlgorithmController::get_max_iterations ( ) const
inline

Return the maximum number of iterations.

◆ get_num_threads()

uint_t bitrl::utils::IterativeAlgorithmController::get_num_threads ( ) const
inline

Get the number of threads used.

◆ get_residual()

real_t bitrl::utils::IterativeAlgorithmController::get_residual ( ) const
inline

get_residual

Returns

◆ get_state()

IterativeAlgorithmResult bitrl::utils::IterativeAlgorithmController::get_state ( ) const

Returns the state of the controller.

◆ operator=() [1/2]

IterativeAlgorithmController & bitrl::utils::IterativeAlgorithmController::operator= ( const IterativeAlgorithmController )
default

copy assignement

◆ operator=() [2/2]

IterativeAlgorithmController & bitrl::utils::IterativeAlgorithmController::operator= ( IterativeAlgorithmController &&  )
default

move copy assignement

◆ reset() [1/2]

void bitrl::utils::IterativeAlgorithmController::reset ( )

reset

◆ reset() [2/2]

void bitrl::utils::IterativeAlgorithmController::reset ( const IterativeAlgorithmController control)

reset

◆ set_max_itrs()

void bitrl::utils::IterativeAlgorithmController::set_max_itrs ( uint_t  max_itrs)
inline

set_max_itrs

Parameters
max_itrs

◆ set_num_threads()

void bitrl::utils::IterativeAlgorithmController::set_num_threads ( uint_t  nthreads)
inline

Set the number of threads.

◆ set_show_iterations_flag()

void bitrl::utils::IterativeAlgorithmController::set_show_iterations_flag ( bool  flag)
inline

show iterations

◆ set_tolerance()

void bitrl::utils::IterativeAlgorithmController::set_tolerance ( real_t  tol)
inline

set_tolerance

Parameters
tol

◆ set_track_residuals_flag()

void bitrl::utils::IterativeAlgorithmController::set_track_residuals_flag ( bool  flag)
inline

set_track_residuals_flag

Parameters
flag

◆ show_iterations()

bool bitrl::utils::IterativeAlgorithmController::show_iterations ( ) const
inline

show iterations

◆ track_residuals()

bool bitrl::utils::IterativeAlgorithmController::track_residuals ( ) const
inline

track_residuals

Returns

◆ update_residual()

void bitrl::utils::IterativeAlgorithmController::update_residual ( real_t  res)
inline

Update the residual.


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