From 419e8b9fce45dc985672b521c1ad7a60bc0211d3 Mon Sep 17 00:00:00 2001 From: Manas Rachh Date: Mon, 1 Apr 2024 17:20:11 -0500 Subject: [PATCH] fixing kernel class check --- chunkie/+chnk/+rcip/Rcompchunk.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/chunkie/+chnk/+rcip/Rcompchunk.m b/chunkie/+chnk/+rcip/Rcompchunk.m index 651c616..9533aeb 100644 --- a/chunkie/+chnk/+rcip/Rcompchunk.m +++ b/chunkie/+chnk/+rcip/Rcompchunk.m @@ -101,8 +101,10 @@ if(size(fkern)==1) fkernlocal = fkern; - if isa(fkern.shifted_eval, 'function_handle') - fkernlocal.eval = @(s,t) fkern.shifted_eval(s, t, ctr(:,1)); + if isa(fkern, 'kernel') + if isa(fkern.shifted_eval, 'function_handle') + fkernlocal.eval = @(s,t) fkern.shifted_eval(s, t, ctr(:,1)); + end end else fkernlocal(nedge,nedge) = kernel(); @@ -111,8 +113,11 @@ for j=1:nedge icj = iedgechunks(1,j); fkernlocal(i,j) = fkern(ici,icj); - if isa(fkern(ici,icj).shifted_eval, 'function_handle') - fkernlocal(i,j).eval = @(s,t) fkern(ici,icj).shifted_eval(s,t,ctr(:,i)); + if isa(fkern(ici,icj), 'kernel') + if isa(fkern(ici,icj).shifted_eval, 'function_handle') + fkernlocal(i,j).eval = ... + @(s,t) fkern(ici,icj).shifted_eval(s,t,ctr(:,i)); + end end end end