77 lines
749 B
Julia
77 lines
749 B
Julia
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 # active
|
|
view(refractoryActive, 1, 1, i, j) .= 1
|
|
view(refractoryInactive, 1, 1, i, j) .= 0
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end # module |