Gaussian-to-Dirac approximation (diagonal covariance).
Overview
gm_to_dirac_short<T> approximates a multivariate Gaussian distribution with diagonal covariance by a Dirac mixture with L components in N dimensions.
The covariance is provided as a diagonal vector (covDiag).
This implementation performs gradient-based optimization using a GSL minimizer backend.
It is a single-threaded implementation.
Interface
Inherits:
Template parameter:
Provides overloads of:
- approximate(...)
- modified_van_mises_distance_sq(...)
- modified_van_mises_distance_sq_derivative(...)
Parameters
Common parameters:
- covDiag → diagonal of Gaussian covariance (size N)
- L → number of Dirac components
- N → dimension
- bMax → integration bound
- x → initial guess and output locations (L × N)
- wX → weights of the Dirac mixture (optional)
If wX is nullptr:
- Uniform weights are assumed
Supported Input Formats
Three overload families are available:
- Raw pointer interface (T*)
- GSL vector interface (gsl_vector / gsl_vector_float)
- GSL matrix interface (gsl_matrix / gsl_matrix_float)
Memory layout:
- covDiag represents the covariance diagonal (size N)
- x represents L × N Dirac locations
Example (Raw Pointer)
covDiag,
L,
N,
bMax,
x,
wX,
);
Definition dirac_to_dirac_approx_short.h:9
bool approximate(const T *y, size_t M, size_t L, size_t N, size_t bMax, T *x, const T *wX=nullptr, const T *wY=nullptr, GslminimizerResult *result=nullptr, const ApproximateOptions &options=ApproximateOptions{}) override
reduce the data points using raw pointers
Definition dirac_to_dirac_approx_short.cpp:24
Example (GSL Vector)
Example (GSL Matrix)
Notes
- Single-threaded implementation
- Uses analytical gradient evaluation
- Requires diagonal covariance input
- Interface-compatible with other Gaussian-to-Dirac variants