Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding AbstractKernel #509

Open
Crown421 opened this issue May 21, 2023 · 1 comment
Open

Adding AbstractKernel #509

Crown421 opened this issue May 21, 2023 · 1 comment

Comments

@Crown421
Copy link
Member

Crown421 commented May 21, 2023

This might be a controversial point, but I have a few times been surprised by the fact that Kernel is an abstract type.

I would like to propose/ consider adding AbstractKernel, with the subtypes SimpleKernel, MOKernel and Kernel, where Kernel would further be the supertype of the various kernels that are not mentioned.
This would be in line with how kernelmatrix is defined, which is specialized for SimpleKernels and for all concrete instances of MOKernels, but falls back to kernel.(x, permutedims(y)) for Kernels, which should continue.

@devmotion
Copy link
Member

I don't have a strong opinion on the name Kernel vs AbstractKernel - there is no consensus in Julia (not even in Base - AbstractArray, Real and Number are all abstract types) about whether abstract types should be named Abstract... or not. Sometimes Abstract... seems nice because then the non-Abstract name can be used for a concrete default implementation - but that's not an argument here since there is no default kernel type. Also with this proposal SimpleKernel etc. would be abstract types that are not of the form Abstract....

In any case, I think at most Kernel could be renamed to AbstractKernel but I don't see a reason to add a new abstract sub-type for kernels that are neither SimpleKernel nor MOKernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants