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);
46 virtual bool approximate(
const T* y,
size_t M,
size_t L,
size_t N,
47 size_t bMax, T* x, wXf wXcallback, wXd wXDcallback,
66 size_t L,
size_t N,
size_t bMax,
85 T* gradient,
const T* y,
size_t M,
size_t L,
size_t N,
size_t bMax, T* x,
86 wXf wXcallback, wXd wXDcallback) = 0;
102 virtual bool approximate(
const GSLVectorType* y,
size_t L,
size_t N,
103 size_t bMax, GSLVectorType* x, wXf wXcallback,
121 const GSLVectorType* y,
size_t L,
122 size_t N,
size_t bMax,
123 GSLVectorType* x, wXf wXcallback,
124 wXd wXDcallback) = 0;
140 GSLMatrixType* gradient,
const GSLVectorType* y,
size_t L,
size_t N,
141 size_t bMax, GSLVectorType* x, wXf wXcallback, wXd wXDcallback) = 0;
157 GSLMatrixType* x, wXf wXcallback, wXd wXDcallback,
174 size_t L,
size_t bMax,
175 GSLMatrixType* x, wXf wXcallback,
176 wXd wXDcallback) = 0;
191 GSLMatrixType* gradient, GSLMatrixType* y,
size_t L,
size_t bMax,
192 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 bool approximate(const GSLVectorType *y, size_t L, size_t N, size_t bMax, GSLVectorType *x, wXf wXcallback, wXd wXDcallback, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using gsl vectors
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, size_t bMax, 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 bool approximate(const T *y, size_t M, size_t L, size_t N, size_t bMax, T *x, wXf wXcallback, wXd wXDcallback, GslminimizerResult *result, const ApproximateOptions &options)=0
reduce the data points using raw pointers
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
Definition approximate_options.h:6
struct to hold the result of the minimization
Definition gsl_minimizer.h:32