method virtual compute_kf: kernel_function -> 'a