1#ifndef DIRAC_TO_DIRAC_APPROX_FUNCTION_I_H
2#define DIRAC_TO_DIRAC_APPROX_FUNCTION_I_H
4#include <gsl/gsl_matrix.h>
5#include <gsl/gsl_matrix_float.h>
6#include <gsl/gsl_matrix_long_double.h>
10#include "approximate_options.h"
11#include "gsl_minimizer.h"
12#include "gsl_vector_matrix_types.h"
23 using GSLVectorType =
typename GSLTemplateTypeAlias<T>::VectorType;
24 using GSLVectorViewType =
typename GSLTemplateTypeAlias<T>::VectorViewType;
25 using GSLMatrixType =
typename GSLTemplateTypeAlias<T>::MatrixType;
26 using wXf = void (*)(
const double* x,
double* res,
size_t L,
size_t N);
45 virtual bool approximate(
const T* y,
size_t M,
size_t L,
size_t N, T* x,
46 wXf wXcallback, wXd wXDcallback,
65 size_t L,
size_t N,
size_t bMax,
84 T* gradient,
const T* y,
size_t M,
size_t L,
size_t N,
size_t bMax, T* x,
85 wXf wXcallback, wXd wXDcallback) = 0;
100 virtual bool approximate(
const GSLVectorType* y,
size_t L,
size_t N,
101 GSLVectorType* x, wXf wXcallback, wXd wXDcallback,
119 const GSLVectorType* y,
size_t L,
120 size_t N,
size_t bMax,
121 GSLVectorType* x, wXf wXcallback,
122 wXd wXDcallback) = 0;
138 GSLMatrixType* gradient,
const GSLVectorType* y,
size_t L,
size_t N,
139 size_t bMax, GSLVectorType* x, wXf wXcallback, wXd wXDcallback) = 0;
153 virtual bool approximate(GSLMatrixType* y,
size_t L, GSLMatrixType* x,
154 wXf wXcallback, wXd wXDcallback,
171 size_t L,
size_t bMax,
172 GSLMatrixType* x, wXf wXcallback,
173 wXd wXDcallback) = 0;
188 GSLMatrixType* gradient, GSLMatrixType* y,
size_t L,
size_t bMax,
189 GSLMatrixType* x, wXf wXcallback, wXd wXDcallback) = 0;
interface for the gausian mixture to dirac approximation with a custom weight function
Definition dirac_to_dirac_approx_function_i.h:21
virtual void modified_van_mises_distance_sq_derivative(GSLMatrixType *gradient, const GSLVectorType *y, size_t L, size_t N, size_t bMax, GSLVectorType *x, wXf wXcallback, wXd wXDcallback)=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, wXf wXcallback, wXd wXDcallback)=0
calculate modified van mises distance based on x and y
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, wXf wXcallback, wXd wXDcallback)=0
calculate modified van mises distance based on x and y
virtual bool approximate(GSLMatrixType *y, size_t L, GSLMatrixType *x, wXf wXcallback, wXd wXDcallback, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using gsl matricies where possible
virtual void modified_van_mises_distance_sq_derivative(GSLMatrixType *gradient, GSLMatrixType *y, size_t L, size_t bMax, GSLMatrixType *x, wXf wXcallback, wXd wXDcallback)=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, wXf wXcallback, wXd wXDcallback)=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, wXf wXcallback, wXd wXDcallback)=0
calculate modified van mises distance based on x and y
virtual bool approximate(const GSLVectorType *y, size_t L, size_t N, GSLVectorType *x, wXf wXcallback, wXd wXDcallback, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using gsl vectors
virtual bool approximate(const T *y, size_t M, size_t L, size_t N, T *x, wXf wXcallback, wXd wXDcallback, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using raw pointers
Definition approximate_options.h:6
struct to hold the result of the minimization
Definition gsl_minimizer.h:32