lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
lucid::ValleePoussinKernel Class Referencefinal

Vallée-Poussin kernel. More...

#include <ValleePoussinKernel.h>

Inheritance diagram for lucid::ValleePoussinKernel:
lucid::Kernel lucid::Parametrizable

Public Member Functions

 ValleePoussinKernel (double a=1.0, double b=1.0)
 Construct a new ValleePoussinKernel object with the given parameters.
 
bool is_stationary () const override
 Check whether the kernel is is stationary.
 
double a () const
 Get read-only access to the a parameter of the kernel.
 
double b () const
 Get read-only access to the b parameter of the kernel.
 
double get_d (Parameter parameter) const override
 Get the value of the specified parameter.
 
void set (Parameter parameter, double value) override
 Set the parameter to the indicated value.
 
std::unique_ptr< Kernelclone () const override
 Clone the kernel.
 
std::string to_string () const override
 Get string representation of the kernel.
 
- Public Member Functions inherited from lucid::Kernel
template<class DerivedX, class DerivedY>
Matrix operator() (const MatrixBase< DerivedX > &x1, const MatrixBase< DerivedY > &x2) const
 Compute the kernel function on \( x_1 \) and \( x_2 \), both being matrices of row vectors in \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \),.
 
template<class Derived>
Matrix operator() (const MatrixBase< Derived > &x) const
 Compute the kernel function on \( \texttip{x}{Element of the vector space} \), which is a matrix of row vectors in \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \),.
 
template<class Derived>
Matrix operator() (const MatrixBase< Derived > &x, std::vector< Matrix > &gradient) const
 Compute the kernel function on \( \texttip{x}{Element of the vector space} \), which is a matrix of row vectors in \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \),.
 
- Public Member Functions inherited from lucid::Parametrizable
template<IsAnyOf< int, double, const Vector & > 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, 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< Parameterparameters_list () const
 Get read-only access to the list of parameters of the parametrizable object.
 
Parametrizableload (const Parametrizable &o)
 Load parameters from another Parametrizable object.
 

Private Member Functions

Matrix apply_impl (ConstMatrixRef x1, ConstMatrixRef x2, std::vector< Matrix > *gradient) const override
 Concrete implementation of operator()().
 

Private Attributes

double a_
 'a' parameter
 
double b_
 'b' parameter
 

Additional Inherited Members

- Protected Member Functions inherited from lucid::Kernel
Matrix operator() (ConstMatrixRef x1, ConstMatrixRef x2, std::vector< Matrix > *gradient) const
 Compute the kernel function on \( x_1 \) and \( x_2 \), both being matrices of row vectors in \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \),.
 
- Protected Member Functions inherited from lucid::Parametrizable
virtual int get_i (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 inherited from lucid::Parametrizable
Parameters parameters_
 Parameters supported by this object.
 

Detailed Description

Vallée-Poussin kernel.

Given a vector space \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^n \) and a vector \( x \in \mathcal{X} \), the Vallee-Poussin kernel \( k_{a,b}^n : \mathcal{X} \to \mathbb{R} \) with parameters \( a, b \in \mathbb{R} \) is defined as

\[k_{a,b}^n(x) = \frac{1}{(b - a)^n} \prod_{i=1}^{n} \frac{ \sin\left( \frac{b + a}{2} x_i \right) \sin\left( \frac{b - a}{2} x_i \right) }{ \sin^2{\left( \frac{x_i}{2} \right)} } \]

Constructor & Destructor Documentation

◆ ValleePoussinKernel()

lucid::ValleePoussinKernel::ValleePoussinKernel ( double a = 1.0,
double b = 1.0 )
explicit

Construct a new ValleePoussinKernel object with the given parameters.

Parameters
aparameter
bparameter

Member Function Documentation

◆ a()

double lucid::ValleePoussinKernel::a ( ) const
inlinenodiscard

Get read-only access to the a parameter of the kernel.

Returns
a parameter of the kernel

◆ apply_impl()

Matrix lucid::ValleePoussinKernel::apply_impl ( ConstMatrixRef x1,
ConstMatrixRef x2,
std::vector< Matrix > * gradient ) const
overrideprivatevirtual

Concrete implementation of operator()().

Parameters
x1\( \texttip{n_1}{Number of samples in the first matrix} \times \texttip{d}{Dimension of the vector space} \) first input matrix
x2\( \texttip{n_2}{Number of samples in the second matrix} \times \texttip{d}{Dimension of the vector space} \) second input matrix
[out]gradientpointer to store the gradient of the kernel function with respect to the kernel parameters
Returns
kernel value

Implements lucid::Kernel.

◆ b()

double lucid::ValleePoussinKernel::b ( ) const
inlinenodiscard

Get read-only access to the b parameter of the kernel.

Returns
b parameter of the kernel

◆ clone()

std::unique_ptr< Kernel > lucid::ValleePoussinKernel::clone ( ) const
nodiscardoverridevirtual

Clone the kernel.

Create a new instance of the kernel with the same parameters.

Returns
new instance of the kernel

Implements lucid::Kernel.

◆ get_d()

double lucid::ValleePoussinKernel::get_d ( Parameter parameter) const
nodiscardoverridevirtual

Get the value of the specified parameter.

Parameters
parameterparameter to retrieve
Returns
value of the parameter
Precondition
The parameter must be present and be associated with a value of type double.

Reimplemented from lucid::Parametrizable.

◆ is_stationary()

bool lucid::ValleePoussinKernel::is_stationary ( ) const
inlinenodiscardoverridevirtual

Check whether the kernel is is stationary.

Returns
true if the kernel is is stationary
false if the kernel is not is stationary

Implements lucid::Kernel.

◆ set()

void lucid::ValleePoussinKernel::set ( Parameter parameter,
double value )
overridevirtual

Set the parameter to the indicated value.

Parameters
parameterparameter to set
valuevalue to assign to the specified parameter
Precondition
The parameter must be present and be associated with a value of type double.

Reimplemented from lucid::Parametrizable.

◆ to_string()

std::string lucid::ValleePoussinKernel::to_string ( ) const
nodiscardoverridevirtual

Get string representation of the kernel.

Returns
string representation Obtain the string representation of this object.
string representation of this object

Reimplemented from lucid::Kernel.


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