bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
lp_metric.h
Go to the documentation of this file.
1#ifndef LP_METRIC_H
2#define LP_METRIC_H
3
4#include "cubeai/base/cubeai_types.h"
5#include <vector>
6
7namespace cuberl{
8namespace maths {
9
10
13
14template<int P, bool TTakeRoot = true>
16{
17
18public:
19
20 static const int Power = P;
21 static const bool TakeRoot = TTakeRoot;
25
30
35 LpMetric()=default;
36
40 real_t operator()(const DynVec<real_t>& v1, const DynVec<real_t>& v2)const;
41
45 static real_t evaluate(const DynVec<real_t>& v1, const DynVec<real_t>& v2);
46
50 static real_t evaluate(const std::vector<real_t>& v1, const std::vector<real_t>& v2);
51
52
53};
54
55
60
61}
62}
63
64#include "cubeai/maths/lp_metric_impl.h"
65
66#endif // LP_METRIC_H
The LpMetric class It conforms to the metric policy.
Definition lp_metric.h:16
real_t value_type
Definition lp_metric.h:24
LpMetric()=default
Default constructor. It is required to satisfy the metric policy.
static real_t tolerance_value
Definition lp_metric.h:22
static real_t tolerance()
Tolerance used by the class.
Definition lp_metric.h:29
real_t operator()(const DynVec< real_t > &v1, const DynVec< real_t > &v2) const
Overload operator()
Definition lp_metric_impl.h:86
static const bool TakeRoot
Definition lp_metric.h:21
static real_t evaluate(const DynVec< real_t > &v1, const DynVec< real_t > &v2)
evaluate
Definition lp_metric_impl.h:15
static const int Power
Definition lp_metric.h:20
real_t cost_type
Definition lp_metric.h:23
double real_t
real_t
Definition bitrl_types.h:23
Eigen::RowVectorX< T > DynVec
Dynamically sized row vector.
Definition bitrl_types.h:74
Various utilities used when working with RL problems.
Definition cuberl_types.h:16