bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
cubeai_concepts.h
Go to the documentation of this file.
1#ifndef CUBEAI_CONCEPTS_H
2#define CUBEAI_CONCEPTS_H
11#include "cuberl/base/cubeai_config.h"
12
13#ifdef USE_PYTORCH
14#include "torch/torch.h"
15#endif
16
17
18#include <type_traits>
19
20namespace cuberl{
21namespace utils {
22namespace concepts {
23
24template<typename VectorType>
25concept integral_vector = std::is_integral<typename VectorType::value_type>::value;
26
27template<typename VectorType>
28concept float_vector = std::is_floating_point<typename VectorType::value_type>::value;
29
30template<typename VectorType>
31concept float_or_integral_vector = std::is_integral<typename VectorType::value_type>::value || std::is_floating_point<typename VectorType::value_type>::value;
32
33template<typename Type>
34concept is_default_constructible = std::is_default_constructible<Type>::value;
35
36
37#ifdef USE_PYTORCH
38template<typename AlgoType>
39concept pytorch_module = std::is_base_of<torch::nn::Module, AlgoType>::value;
40#endif
41
42}
43
44}
45}
46
47#endif // CUBEAI_CONSTRAINTS_H
Definition cubeai_concepts.h:28
Definition cubeai_concepts.h:25
Various utilities used when working with RL problems.
Definition cuberl_types.h:16