Skip to content

Commit 3bd5812

Browse files
committed
Separate directory for base kernels
1 parent 252f595 commit 3bd5812

26 files changed

+18
-13
lines changed

src/KernelFunctions.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ include("distances/delta.jl")
4848
include("distances/sinus.jl")
4949
include("transform/transform.jl")
5050

51-
for k in ["exponential","matern","polynomial","constant","rationalquad","exponentiated","cosine","maha","fbm","gabor","periodic","piecewisepolynomial"]
52-
include(joinpath("kernels",k*".jl"))
51+
for f in readdir(joinpath(@__DIR__, "basekernels"))
52+
endswith(f, ".jl") && include(joinpath("basekernels", f))
5353
end
54+
5455
include("kernels/transformedkernel.jl")
5556
include("kernels/scaledkernel.jl")
5657
include("matrix/kernelmatrix.jl")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/runtests.jl

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,24 @@ using KernelFunctions: metric
6262
include(joinpath("transform", "transform.jl"))
6363
end
6464

65+
@testset "basekernels" begin
66+
include(joinpath("basekernels", "constant.jl"))
67+
include(joinpath("basekernels", "cosine.jl"))
68+
include(joinpath("basekernels", "exponential.jl"))
69+
include(joinpath("basekernels", "exponentiated.jl"))
70+
include(joinpath("basekernels", "fbm.jl"))
71+
include(joinpath("basekernels", "gabor.jl"))
72+
include(joinpath("basekernels", "maha.jl"))
73+
include(joinpath("basekernels", "matern.jl"))
74+
include(joinpath("basekernels", "periodic.jl"))
75+
include(joinpath("basekernels", "polynomial.jl"))
76+
include(joinpath("basekernels", "piecewisepolynomial.jl"))
77+
include(joinpath("basekernels", "rationalquad.jl"))
78+
end
79+
6580
@testset "kernels" begin
66-
include(joinpath("kernels", "constant.jl"))
67-
include(joinpath("kernels", "cosine.jl"))
68-
include(joinpath("kernels", "exponential.jl"))
69-
include(joinpath("kernels", "exponentiated.jl"))
70-
include(joinpath("kernels", "fbm.jl"))
71-
include(joinpath("kernels", "gabor.jl"))
7281
include(joinpath("kernels", "kernelproduct.jl"))
7382
include(joinpath("kernels", "kernelsum.jl"))
74-
include(joinpath("kernels", "matern.jl"))
75-
include(joinpath("kernels", "periodic.jl"))
76-
include(joinpath("kernels", "polynomial.jl"))
77-
include(joinpath("kernels", "piecewisepolynomial.jl"))
78-
include(joinpath("kernels", "rationalquad.jl"))
7983
include(joinpath("kernels", "scaledkernel.jl"))
8084
include(joinpath("kernels", "transformedkernel.jl"))
8185

0 commit comments

Comments
 (0)