|
|
lucid
0.0.1
Lifting-based Uncertain Control Invariant Dynamics
|
Interface for objects that allow setting and getting parameters dynamically. More...
#include <Parametrizable.h>
Public Member Functions | |
| template<IsAnyOf< int, double, const Vector & > T> | |
| T | get (Parameter parameter) const |
Get the value of the specified parameter. | |
| template<Parameter P> | |
| internal::ParameterType< P >::ref_type | get () const |
Get the value of the specified parameter. | |
| std::variant< int, double, Vector > | get (Parameter parameter) const |
Get the value of the specified parameter. | |
| void | set (Parameter parameter, const std::variant< int, double, Vector > &value) |
Set the parameter to the indicated value. | |
| template<Parameter P> | |
| void | set (const std::variant< int, double, Vector > &value) |
Set the parameter to the indicated value. | |
| void | set (Parameter parameter, std::size_t idx, const std::variant< std::vector< int >, std::vector< double >, std::vector< Vector > > &values) |
Set the parameter to the index-th value among the indicated values. | |
| template<Parameter P> | |
| void | set (std::size_t idx, const std::variant< std::vector< int >, std::vector< double >, std::vector< Vector > > &values) |
Set the parameter to the index-th value among the indicated values. | |
| virtual void | set (Parameter parameter, int value) |
Set the parameter to the indicated value. | |
| virtual void | set (Parameter parameter, double value) |
Set the parameter to the indicated value. | |
| virtual void | set (Parameter parameter, const Vector &value) |
Set the parameter to the indicated value. | |
| template<Parameter P> | |
| void | set (typename internal::ParameterType< P >::ref_type value) |
Set the parameter to the indicated value. | |
| bool | has (const Parameter parameter) const |
Check whether the parameter is present in this object. | |
| Parameters | parameters () const |
| Get read-only access to the parameters of the parametrizable object. | |
| std::vector< Parameter > | parameters_list () const |
| Get read-only access to the list of parameters of the parametrizable object. | |
| Parametrizable & | load (const Parametrizable &o) |
Load parameters from another Parametrizable object. | |
Protected Member Functions | |
| virtual int | get_i (Parameter parameter) const |
Get the value of the specified parameter. | |
| virtual double | get_d (Parameter parameter) const |
Get the value of the specified parameter. | |
| virtual const Vector & | get_v (Parameter parameter) const |
Get the value of the specified parameter. | |
Protected Attributes | |
| Parameters | parameters_ |
| Parameters supported by this object. | |
Interface for objects that allow setting and getting parameters dynamically.
Parametrizable objects can have parameters of different types, i.e., int, double, and eigen Vectors.
|
inlinenodiscard |
Get the value of the specified parameter.
| P | parameter to retrieve |
parameter must be present.
|
nodiscard |
Get the value of the specified parameter.
| T | type of the value to retrieve |
| parameter | parameter to retrieve |
parameter must be present and be associated with a value of type T.
|
nodiscard |
Get the value of the specified parameter.
| parameter | parameter to retrieve |
|
nodiscardprotectedvirtual |
Get the value of the specified parameter.
| parameter | parameter to retrieve |
parameter must be present and be associated with a value of type double. Reimplemented in lucid::GaussianKernel, lucid::KernelRidgeRegressor, and lucid::ValleePoussinKernel.
|
nodiscardprotectedvirtual |
Get the value of the specified parameter.
| parameter | parameter to retrieve |
parameter must be present and be associated with a value of type int. Reimplemented in lucid::KernelRidgeRegressor.
|
nodiscardprotectedvirtual |
Get the value of the specified parameter.
| parameter | parameter to retrieve |
parameter must be present and be associated with a value of type Vector. Reimplemented in lucid::GaussianKernel, and lucid::KernelRidgeRegressor.
|
inlinenodiscard |
Check whether the parameter is present in this object.
| parameter | parameter to check |
| Parametrizable & lucid::Parametrizable::load | ( | const Parametrizable & | o | ) |
Load parameters from another Parametrizable object.
Only parameters that are present in both objects will be copied.
| o | object to copy parameters from |
|
inlinenodiscard |
Get read-only access to the parameters of the parametrizable object.
The parameters are stored in compressed form, needing bitwise operation to be accessed.
|
nodiscard |
Get read-only access to the list of parameters of the parametrizable object.
|
inline |
Set the parameter to the indicated value.
| P | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value matching the variant. | void lucid::Parametrizable::set | ( | Parameter | parameter, |
| const std::variant< int, double, Vector > & | value ) |
Set the parameter to the indicated value.
| parameter | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value matching the variant.
|
virtual |
Set the parameter to the indicated value.
| parameter | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value of type Vector. Reimplemented in lucid::GaussianKernel, and lucid::KernelRidgeRegressor.
|
virtual |
Set the parameter to the indicated value.
| parameter | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value of type double. Reimplemented in lucid::GaussianKernel, lucid::KernelRidgeRegressor, and lucid::ValleePoussinKernel.
|
virtual |
Set the parameter to the indicated value.
| parameter | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value of type int. Reimplemented in lucid::KernelRidgeRegressor.
| void lucid::Parametrizable::set | ( | Parameter | parameter, |
| std::size_t | idx, | ||
| const std::variant< std::vector< int >, std::vector< double >, std::vector< Vector > > & | values ) |
Set the parameter to the index-th value among the indicated values.
| parameter | parameter to set |
| idx | index of the value to assign |
| values | values to assign to the specified parameter |
parameter must be present and be associated with a value matching the variant.
|
inline |
Set the parameter to the index-th value among the indicated values.
| P | parameter to set |
| idx | index of the value to assign |
| values | values to assign to the specified parameter |
parameter must be present and be associated with a value matching the variant.
|
inline |
Set the parameter to the indicated value.
| P | parameter to set |
| value | value to assign to the specified parameter |
parameter must be present and be associated with a value of type Vector.