building forwared()
This commit is contained in:
78
src/snnUtil.jl
Normal file
78
src/snnUtil.jl
Normal file
@@ -0,0 +1,78 @@
|
||||
module snnUtil
|
||||
|
||||
export refractoryStatus!
|
||||
|
||||
# using
|
||||
|
||||
#------------------------------------------------------------------------------------------------100
|
||||
|
||||
function refractoryStatus!(refractoryCounter, refractoryActive, refractoryInactive)
|
||||
d1, d2, d3, d4 = size(refractoryCounter)
|
||||
for j in 1:d4
|
||||
for i in 1:d3
|
||||
if refractoryCounter[1, 1, i, j] > 0 # inactive
|
||||
view(refractoryActive, 1, 1, i, j) .= 0
|
||||
view(refractoryInactive, 1, 1, i, j) .= 1
|
||||
else
|
||||
view(refractoryActive, 1, 1, i, j) .= 1
|
||||
view(refractoryInactive, 1, 1, i, j) .= 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end # module
|
||||
Reference in New Issue
Block a user