From 583def2e4d10cfc27238c7d4a472c51f3dda2f25 Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Apr 2024 15:54:43 +0200 Subject: [PATCH] adapted julia and matlab files for der_laplacian_kernel --- julia/fastsum/libfastsumjulia.c | 2 ++ matlab/fastsum/fastsummex.c | 2 ++ matlab/fastsum/simple_test.m | 1 + matlab/fastsum/test_fastsum.m | 1 + 4 files changed, 6 insertions(+) diff --git a/julia/fastsum/libfastsumjulia.c b/julia/fastsum/libfastsumjulia.c index 8b42fd75..c74021b2 100644 --- a/julia/fastsum/libfastsumjulia.c +++ b/julia/fastsum/libfastsumjulia.c @@ -55,6 +55,8 @@ int jfastsum_init( fastsum_plan* p, int d, char* s, double* c, unsigned int f, i kernel = log_sin; else if ( strcmp(s, "laplacian_rbf") == 0 ) kernel = laplacian_rbf; + else if ( strcmp(s, "der_laplacian_rbf") == 0 ) + kernel = der_laplacian_rbf; else if ( strcmp(s, "xx_gaussian") == 0 ) kernel = xx_gaussian; else if ( strcmp(s, "absx") == 0 ) diff --git a/matlab/fastsum/fastsummex.c b/matlab/fastsum/fastsummex.c index 47fece56..ea50560a 100644 --- a/matlab/fastsum/fastsummex.c +++ b/matlab/fastsum/fastsummex.c @@ -134,6 +134,8 @@ static kernel get_kernel(const mxArray *p) ker = log_sin; else if (strcmp(s, "laplacian_rbf") == 0) ker = laplacian_rbf; + else if (strcmp(s, "der_laplacian_rbf") == 0) + ker = der_laplacian_rbf; else if (strcmp(s, "xx_gaussian") == 0) ker = xx_gaussian; else if (strcmp(s, "absx") == 0) diff --git a/matlab/fastsum/simple_test.m b/matlab/fastsum/simple_test.m index d5534f26..6ed15571 100644 --- a/matlab/fastsum/simple_test.m +++ b/matlab/fastsum/simple_test.m @@ -39,6 +39,7 @@ % 'one_over_cube' K(x) = 1/x^3 % 'log_sin' K(x) = LOG(|SIN(cx)|) % 'laplacian_rbf' K(x) = EXP(-|x|/c) +% 'der_laplacian_rbf' K(x) = |x|/c EXP(-|x|/c) % 'xx_gaussian' K(x) = x^2/c^2 EXP(-x^2/c^2) % 'absx' K(x) = |x| diff --git a/matlab/fastsum/test_fastsum.m b/matlab/fastsum/test_fastsum.m index d316a0c2..ab1aff68 100644 --- a/matlab/fastsum/test_fastsum.m +++ b/matlab/fastsum/test_fastsum.m @@ -39,6 +39,7 @@ % 'one_over_cube' K(x) = 1/x^3 % 'log_sin' K(x) = LOG(|SIN(cx)|) % 'laplacian_rbf' K(x) = EXP(-|x|/c) +% 'der_laplacian_rbf' K(x) = |x|/c EXP(-|x|/c) % 'xx_gaussian' K(x) = x^2/c^2 EXP(-x^2/c^2) % 'absx' K(x) = |x|