Deterministic Gaussian Sampling
Loading...
Searching...
No Matches
dirac_to_dirac_approx_i.h
1#ifndef DIRAC_TO_DIRAC_APPROX_I_H
2#define DIRAC_TO_DIRAC_APPROX_I_H
3
4#include <gsl/gsl_matrix.h>
5#include <gsl/gsl_matrix_float.h>
6#include <gsl/gsl_matrix_long_double.h>
7
8#include <type_traits>
9
10#include "approximate_options.h"
11#include "gsl_minimizer.h"
12#include "gsl_vector_matrix_types.h"
13
19template <typename T>
21 public:
22 using GSLVectorType = typename GSLTemplateTypeAlias<T>::VectorType;
23 using GSLVectorViewType = typename GSLTemplateTypeAlias<T>::VectorViewType;
24 using GSLMatrixType = typename GSLTemplateTypeAlias<T>::MatrixType;
25 using GSLMatrixViewType = typename GSLTemplateTypeAlias<T>::MatrixViewType;
26
27 virtual ~dirac_to_dirac_approx_i() = default;
28
43 virtual bool approximate(const T* y, size_t M, size_t L, size_t N, T* x,
44 const T* wX, const T* wY, GslminimizerResult* result,
45 const ApproximateOptions& options) = 0;
46
61 virtual void modified_van_mises_distance_sq(T* distance, const T* y, size_t M,
62 size_t L, size_t N, size_t bMax,
63 T* x, const T* wX,
64 const T* wY) = 0;
65
81 T* gradient, const T* y, size_t M, size_t L, size_t N, size_t bMax, T* x,
82 const T* wX, const T* wY) = 0;
83
97 virtual bool approximate(const GSLVectorType* y, size_t L, size_t N,
98 GSLVectorType* x, const GSLVectorType* wX,
99 const GSLVectorType* wY, GslminimizerResult* result,
100 const ApproximateOptions& options) = 0;
101
116 T* distance, const GSLVectorType* y, size_t L, size_t N, size_t bMax,
117 GSLVectorType* x, const GSLVectorType* wX, const GSLVectorType* wY) = 0;
118
133 GSLMatrixType* gradient, const GSLVectorType* y, size_t L, size_t N,
134 size_t bMax, GSLVectorType* x, const GSLVectorType* wX,
135 const GSLVectorType* wY) = 0;
136
149 virtual bool approximate(GSLMatrixType* y, size_t L, GSLMatrixType* x,
150 const GSLVectorType* wX, const GSLVectorType* wY,
151 GslminimizerResult* result,
152 const ApproximateOptions& options) = 0;
153
166 virtual void modified_van_mises_distance_sq(T* distance, GSLMatrixType* y,
167 size_t L, size_t bMax,
168 GSLMatrixType* x,
169 const GSLVectorType* wX,
170 const GSLVectorType* wY) = 0;
171
185 GSLMatrixType* gradient, GSLMatrixType* y, size_t L, size_t bMax,
186 GSLMatrixType* x, const GSLVectorType* wX, const GSLVectorType* wY) = 0;
187};
188
189#endif // DIRAC_TO_DIRAC_APPROX_I_H
interface for the gausian mixture to dirac approximation
Definition dirac_to_dirac_approx_i.h:20
virtual void modified_van_mises_distance_sq(T *distance, const T *y, size_t M, size_t L, size_t N, size_t bMax, T *x, const T *wX, const T *wY)=0
calculate modified van mises distance based on x and y
virtual void modified_van_mises_distance_sq(T *distance, GSLMatrixType *y, size_t L, size_t bMax, GSLMatrixType *x, const GSLVectorType *wX, const GSLVectorType *wY)=0
calculate modified van mises distance based on x and y
virtual void modified_van_mises_distance_sq_derivative(GSLMatrixType *gradient, const GSLVectorType *y, size_t L, size_t N, size_t bMax, GSLVectorType *x, const GSLVectorType *wX, const GSLVectorType *wY)=0
calculate modified van mises distance based on x and y
virtual void modified_van_mises_distance_sq(T *distance, const GSLVectorType *y, size_t L, size_t N, size_t bMax, GSLVectorType *x, const GSLVectorType *wX, const GSLVectorType *wY)=0
calculate modified van mises distance based on x and y
virtual void modified_van_mises_distance_sq_derivative(GSLMatrixType *gradient, GSLMatrixType *y, size_t L, size_t bMax, GSLMatrixType *x, const GSLVectorType *wX, const GSLVectorType *wY)=0
calculate modified van mises distance based on x and y
virtual void modified_van_mises_distance_sq_derivative(T *gradient, const T *y, size_t M, size_t L, size_t N, size_t bMax, T *x, const T *wX, const T *wY)=0
calculate modified van mises distance based on x and y
virtual bool approximate(GSLMatrixType *y, size_t L, GSLMatrixType *x, const GSLVectorType *wX, const GSLVectorType *wY, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using gsl matricies where possible
virtual bool approximate(const T *y, size_t M, size_t L, size_t N, T *x, const T *wX, const T *wY, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using raw pointers
virtual bool approximate(const GSLVectorType *y, size_t L, size_t N, GSLVectorType *x, const GSLVectorType *wX, const GSLVectorType *wY, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using gsl vectors
Definition approximate_options.h:6
struct to hold the result of the minimization
Definition gsl_minimizer.h:32