Skip to content

Commit

Permalink
tweak Kernel params
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jan 17, 2022
1 parent ca366ed commit 9c03aca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kernel/kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and `distancemethod`.
- `distancemethod`: [`DistanceMethod`](@ref) object for calculating distance between cells.
The default is [`CentroidToCentroid`](@ref).
"""
struct DispersalKernel{R,N,L,H<:Neighborhood{R,N,L},K,F,C,D<:DistanceMethod} <: AbstractKernelNeighborhood{R,N,L}
struct DispersalKernel{R,N,L,H<:Neighborhood{R,N,L},K,F,C,D<:DistanceMethod} <: AbstractKernelNeighborhood{R,N,L,H}
neighborhood::H
kernel::K
formulation::F
Expand Down Expand Up @@ -60,8 +60,8 @@ DispersalKernel{R}(; radius=R, kw...) where R = DispersalKernel(; radius=radius,

ConstructionBase.constructorof(::Type{<:DispersalKernel}) = DispersalKernel

function DG._setbuffer(n::DispersalKernel{R,N,L,<:Any,K,F,C,D}, buffer) where {R,N,L,K,F,C,D}
newhood = DG._setbuffer(neighborhood(n), buffer)
function DG.setwindow(n::DispersalKernel{R,N,L,<:Any,K,F,C,D}, buffer) where {R,N,L,K,F,C,D}
newhood = DG.setwindow(neighborhood(n), buffer)
DispersalKernel{R,N,L,typeof(newhood),K,F,C,D}(
newhood, kernel(n), formulation(n), cellsize(n), distancemethod(n)
)
Expand Down

0 comments on commit 9c03aca

Please sign in to comment.