Deterministic Gaussian Sampling
Loading...
Searching...
No Matches
dirac_to_dirac_approx_short

Single-threaded Dirac-to-Dirac reduction.

Overview

dirac_to_dirac_approx_short<T> reduces a Dirac mixture with M components to a compact mixture with L components in N dimensions.

This is the base (non-threaded) implementation.

It performs gradient-based optimization of the internal distance metric using a GSL minimizer backend.

Use this implementation for:

  • Small to medium problem sizes
  • Deterministic execution
  • Environments where threading is not desired

For a multi-threaded drop-in replacement, see:

Interface

Inherits:

  • dirac_to_dirac_approx_i<T>

Template parameter:

  • T ∈ {float, double}

Provides overloads of:

  • approximate(...)
  • modified_van_mises_distance_sq(...)
  • modified_van_mises_distance_sq_derivative(...)

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 and parameter semantics are identical across overloads.

Weights

  • wY: weights of the input Dirac mixture
  • wX: weights of the reduced Dirac mixture

If nullptr:

  • Uniform weights are assumed

Example (Raw Pointer)

y, // input points (M × N)
M,
L,
N,
bMax,
x, // initial guess / output
wX, // reduced weights (optional)
wY, // input weights (optional)
);
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