1#ifndef DIRAC_TO_DIRAC_SHORT_THREAD_H
2#define DIRAC_TO_DIRAC_SHORT_THREAD_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 gsl_vector* meanY, gsl_vector* x,
128 const gsl_vector* 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);
133 FRIEND_TEST(dirac_to_dirac_approx_short_test_combined,
134 parameterized_test_combined);
135 friend class testero;
136 friend class benchmark_dirac_to_dirac_approx_short_thread;
141 const gsl_vector_float* y,
size_t L,
size_t N, gsl_vector_float* x,
142 const GSLVectorType* wX,
const GSLVectorType* wY,
147 const gsl_vector* y,
size_t L,
size_t N, gsl_vector* x,
148 const GSLVectorType* wX,
const GSLVectorType* wY,
153 float* distance,
const gsl_vector_float* y,
size_t L,
size_t N,
size_t bMax,
154 gsl_vector_float* x,
const gsl_vector_float* wX,
155 const gsl_vector_float* wY);
159 double* distance,
const gsl_vector* y,
size_t L,
size_t N,
size_t bMax,
160 gsl_vector* x,
const gsl_vector* wX,
const gsl_vector* wY);
165 const gsl_vector_float* y,
166 size_t L,
size_t N,
size_t bMax,
168 const gsl_vector_float* wX,
169 const gsl_vector_float* wY);
173 double>::modified_van_mises_distance_sq_derivative(gsl_matrix* gradient,
178 const gsl_vector* wX,
179 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_thread.h:9
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_thread.cpp:40
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_thread.cpp:56
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_thread.cpp:25
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_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