NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeuralEngine::MachineLearning::GaussHermiteQuadrature< Scalar > Class Template Reference

Gauss-Hermite Quadrature. More...

#include <FgGaussHermiteQuadrature.h>

Static Public Member Functions

static void Compute (int n, af::array &x, af::array &w)
 Data direct. More...
 

Static Private Member Functions

static af::array HermCompanion (const af::array &c)
 Return the scaled companion matrix of c. More...
 
static af::array NormedHermite (const af::array &x, int n)
 Evaluate a normalized Hermite polynomial.. More...
 

Detailed Description

template<typename Scalar>
class NeuralEngine::MachineLearning::GaussHermiteQuadrature< Scalar >

Gauss-Hermite Quadrature.


Gauss–Hermite quadrature is a form of Gaussian quadrature for approximating the value of integrals of the following kind:

$$\int_{-\inf}^{\inf} \exp(-x^2)f(x)dx.$$

In this case

$$\int_{-\inf}^{\inf} \exp(-x^2)f(x)dx\approx\sum_{i=1}^{n}w_i f(x_i),$$

where \(n\) is the number of sample points used. The \(x_i\) are the roots of the physicists' version of the Hermite polynomial \(H_n(x) (i = 1,2,...,n)\), and the associated weights \(w_i\) are given by

$$w_i=\frac{2^{n-1}n!\sqrt{\pi}}{n^2 [H_{n-1}(x_i)]^2}.$$

, 25.09.2019.

Definition at line 47 of file FgGaussHermiteQuadrature.h.

Member Function Documentation

◆ Compute()

template<typename Scalar >
static void NeuralEngine::MachineLearning::GaussHermiteQuadrature< Scalar >::Compute ( int  n,
af::array &  x,
af::array &  w 
)
static

Data direct.


Computes the sample points and weights for Gauss-Hermite quadrature.

, 25.09.2019.

Parameters
nApproximation order.
x[in,out] The sample points.
w[in,out] The weights.

◆ HermCompanion()

template<typename Scalar >
static af::array NeuralEngine::MachineLearning::GaussHermiteQuadrature< Scalar >::HermCompanion ( const af::array &  c)
staticprivate

Return the scaled companion matrix of c.

, 25.09.2019.

Parameters
cThe af::array to process.
Returns
An af::array.

◆ NormedHermite()

template<typename Scalar >
static af::array NeuralEngine::MachineLearning::GaussHermiteQuadrature< Scalar >::NormedHermite ( const af::array &  x,
int  n 
)
staticprivate

Evaluate a normalized Hermite polynomial..


Compute the value of the normalized Hermite polynomial of degree $$n$$ at the points $$\mathbf{x}$$.

HmetalT, 12/11/2019.

Parameters
xPoints at which to evaluate the function.
nDegree of the normalized Hermite function to be evaluated.
Returns
An af::array.

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