1#ifndef DIRAC_TO_DIRAC_SHORT_H
2#define DIRAC_TO_DIRAC_SHORT_H
4#include <gtest/gtest.h>
6#include "dirac_to_dirac_approx_i.h"
11 using GSLVectorType =
typename dirac_to_dirac_approx_i<T>::GSLVectorType;
12 using GSLVectorViewType =
13 typename dirac_to_dirac_approx_i<T>::GSLVectorViewType;
14 using GSLMatrixType =
typename dirac_to_dirac_approx_i<T>::GSLMatrixType;
15 using GSLMatrixViewType =
16 typename dirac_to_dirac_approx_i<T>::GSLMatrixViewType;
24 const T* wX =
nullptr,
25 const T* wY =
nullptr,
38 const T *wX =
nullptr,
39 const T *wY =
nullptr)
override;
50 const T *wX =
nullptr,
51 const T *wY =
nullptr)
override;
59 const GSLVectorType* wX =
nullptr,
60 const GSLVectorType* wY =
nullptr,
67 const GSLVectorType *y,
72 const GSLVectorType *wX =
nullptr,
73 const GSLVectorType *wY =
nullptr)
override;
78 const GSLVectorType *y,
83 const GSLVectorType *wX =
nullptr,
84 const GSLVectorType *wY =
nullptr)
override;
91 const GSLVectorType* wX =
nullptr,
92 const GSLVectorType* wY =
nullptr,
103 const GSLVectorType *wX =
nullptr,
104 const GSLVectorType *wY =
nullptr)
override;
113 const GSLVectorType *wX =
nullptr,
114 const GSLVectorType *wY =
nullptr)
override;
118 static double c_b(
size_t bMax);
124 static void combined_distance_metric(
const gsl_vector* x,
void* params,
125 double* f, gsl_vector* grad);
127 static inline void correctMean(
const GSLVectorType* meanY, GSLVectorType* x,
128 const GSLVectorType* wX,
size_t L,
size_t N);
131 dirac_to_dirac_approx_short_test_modified_van_mises_distance_sq_derivative,
132 parameterized_test_modified_van_mises_distance_sq_derivative);
134 dirac_to_dirac_approx_short_test_modified_van_mises_distance_sq_derivative,
135 parameterized_test_modified_van_mises_distance_sq_derivative_wrapper_distance);
137 dirac_to_dirac_approx_short_test_modified_van_mises_distance_sq_derivative,
138 parameterized_test_modified_van_mises_distance_sq_derivative_wrapper_gradient);
139 FRIEND_TEST(dirac_to_dirac_approx_short_test_combined,
140 parameterized_test_combined);
141 friend class benchmark_dirac_to_dirac_approx_short;
146 const gsl_vector_float* y,
size_t L,
size_t N, gsl_vector_float* x,
147 const gsl_vector_float* wX,
const gsl_vector_float* wY,
152 const gsl_vector* y,
size_t L,
size_t N, gsl_vector* x,
158 float* distance,
const gsl_vector_float* y,
size_t L,
size_t N,
size_t bMax,
159 gsl_vector_float* x,
const gsl_vector_float* wX,
160 const gsl_vector_float* wY);
164 double* distance,
const gsl_vector* y,
size_t L,
size_t N,
size_t bMax,
165 gsl_vector* x,
const gsl_vector* wX,
const gsl_vector* wY);
170 const gsl_vector_float* y,
171 size_t L,
size_t N,
size_t bMax,
173 const gsl_vector_float* wX,
174 const gsl_vector_float* wY);
178 double>::modified_van_mises_distance_sq_derivative(gsl_matrix* gradient,
183 const gsl_vector* wX,
184 const gsl_vector* wY);
interface for the gausian mixture to dirac approximation
Definition dirac_to_dirac_approx_i.h:20
Definition dirac_to_dirac_approx_short.h:9
bool approximate(const GSLVectorType *y, size_t L, size_t N, GSLVectorType *x, const GSLVectorType *wX=nullptr, const GSLVectorType *wY=nullptr, GslminimizerResult *result=nullptr, const ApproximateOptions &options=ApproximateOptions{}) override
reduce the data points using gsl vectors
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=nullptr, const T *wY=nullptr) override
calculate modified van mises distance based on x and y
Definition dirac_to_dirac_approx_short.cpp:39
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=nullptr, const T *wY=nullptr) override
calculate modified van mises distance based on x and y
Definition dirac_to_dirac_approx_short.cpp:54
bool approximate(const T *y, size_t M, size_t L, size_t N, 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
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=nullptr, const GSLVectorType *wY=nullptr) override
calculate modified van mises distance based on x and y
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=nullptr, const GSLVectorType *wY=nullptr) override
calculate modified van mises distance based on x and y
Definition approximate_options.h:6
struct to hold the result of the minimization
Definition gsl_minimizer.h:32