|
Deterministic Gaussian Sampling
|
optimization parameters for the bMax-free closed-form even-N Gaussian-to-Dirac approximation More...
#include <gm_to_dirac_even_binf_optimization_params.h>
Public Member Functions | |
| GMToDiracEvenBinfOptimizationParams (const gsl_vector *wX, size_t N, size_t L) | |
| Construct a new GMToDiracEvenBinfOptimizationParams object. | |
| ~GMToDiracEvenBinfOptimizationParams () | |
| Destroy the GMToDiracEvenBinfOptimizationParams object. | |
| void | update (const gsl_vector *t) |
| project t onto the zero-mean manifold and refresh the caches | |
| bool | hasDegenerateSample () const |
| true if any projected sample sits exactly on the origin | |
| double | sample (size_t i, size_t d) const |
| cached projected sample coordinate s_{i,d} | |
| double | distanceSq (size_t i, size_t j) const |
| cached squared distance T_ij between projected samples i and j | |
Public Member Functions inherited from GslMinimizerOptimizationParams | |
| GslMinimizerOptimizationParams (size_t L, size_t N) | |
Data Fields | |
| const gsl_vector * | wX |
| const size_t | k |
| N / 2. | |
| const double | constant |
| K_k, see lcd_binf_constant() | |
| std::vector< double > | sProjected |
| s = t - 1 * (w^T t), size L * N | |
| std::vector< double > | cSqrdNorm |
| c_i = ||s_i||^2, size L | |
| SquaredEuclideanDistanceUtilsLL * | squaredEuclideanDistanceUtilLL = nullptr |
Data Fields inherited from GslMinimizerOptimizationParams | |
| size_t | L |
| size_t | N |
optimization parameters for the bMax-free closed-form even-N Gaussian-to-Dirac approximation
Mirrors GMToDiracEvenOptimizationParams minus bMax and everything derived from it: there is no reportedOffset and no objectiveOffset, because the bMax-free objective carries its only constant, lcd_binf_constant(k), directly.
It holds one thing the finite-bMax struct does not: the PROJECTED sample buffer. The minimizer's variable is t, but the distance is a function of
s_i = t_i - sum_j w_j t_j
so c_i and T_ij must be computed from s, never from t. update() performs that projection and then refreshes both caches from the result.
|
inline |
Construct a new GMToDiracEvenBinfOptimizationParams object.
| wX | weights of the Dirac mixture, must be non-null and of size L |
| N | dimension of the data, must be even and >= 2 |
| L | number of Dirac components, must be >= 1 |
cached squared distance T_ij between projected samples i and j
The projection is a common translation of every sample, so T_ij is the same for t and for s; it is computed from s regardless, to keep one source of truth.
| i | index of the first sample |
| j | index of the second sample |
|
inline |
true if any projected sample sits exactly on the origin
c_i == 0 is outside the domain of lcd_binf_phi(): it reaches lcd_ei(0), which aborts through GSL's default error handler.
Reads the cache, so update() must have run.
cached projected sample coordinate s_{i,d}
| i | index of the sample |
| d | index of the dimension |
|
inline |
project t onto the zero-mean manifold and refresh the caches
Writes s_i = t_i - sum_j w_j t_j into sProjected, then fills cSqrdNorm and the pairwise distances from s. Must be called whenever t changes, before reading sample(), cSqrdNorm or distanceSq().
| t | optimizer variable, L * N |