bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitrl::utils Namespace Reference

Namespaces

namespace  concepts
namespace  pytorch

Classes

struct  vector_value_type_trait
struct  vector_value_type_trait< std::vector< T > >
struct  vector_value_type_trait< DynVec< T > >
struct  vector_value_type_trait< std::pair< std::vector< T >, uint_t > >
struct  vector_value_type_trait< std::pair< DynVec< T >, uint_t > >
class  ExperienceBuffer
 The ExperienceBuffer class. A buffer based on boost::circular_buffer to accumulate items of type ExperienceType. see for example the A2C algorithm in A2C.h and rl_example_15. More...
class  IterativeAlgorithmController
 Controller for iterative algorithms. More...
struct  IterativeAlgorithmResult
 The IterativeAlgorithmResult struct. Helper struct to assemble the result of an iterative algorithm. More...

Enumerations

enum class  LossType : char { INVALID_TYPE = -1 , CROSS_ENTROPY = 0 , MSE }
 The loss functions a model can be trained with. More...
enum class  TrainEnumType { SEQUENTIAL = 0 , BATCH = 1 }
 Enumeration of train type. More...

Functions

std::ostream & operator<< (std::ostream &out, const IterativeAlgorithmResult &result)
std::string to_string (LossType type)
 to_string. Returns the name of the given LossType
constexpr bool compare (LossType tp1, LossType tp2)
 compare. Returns true when the two types are the same

Variables

template<typename T>
auto bitrl_print = [](const T &val) { std::cout << val << std::endl; }
 Utility lambda to print the given item. Requires C++14.

Enumeration Type Documentation

◆ LossType

enum class bitrl::utils::LossType : char
strong

The loss functions a model can be trained with.

Enumerator
INVALID_TYPE 
CROSS_ENTROPY 
MSE 

◆ TrainEnumType

enum class bitrl::utils::TrainEnumType
strong

Enumeration of train type.

Enumerator
SEQUENTIAL 
BATCH 

Function Documentation

◆ compare()

bool bitrl::utils::compare ( LossType tp1,
LossType tp2 )
inlineconstexpr

compare. Returns true when the two types are the same

◆ operator<<()

std::ostream & bitrl::utils::operator<< ( std::ostream & out,
const IterativeAlgorithmResult & result )
inline

◆ to_string()

std::string bitrl::utils::to_string ( LossType type)
inline

to_string. Returns the name of the given LossType

Parameters
typeThe LossType to convert
Returns
its name, for example "CROSS_ENTROPY"

Variable Documentation

◆ bitrl_print

template<typename T>
auto bitrl::utils::bitrl_print = [](const T &val) { std::cout << val << std::endl; }

Utility lambda to print the given item. Requires C++14.