version 0.0.4
This commit is contained in:
77
previousVersion/0.0.4/src/snnUtil.jl
Normal file
77
previousVersion/0.0.4/src/snnUtil.jl
Normal file
@@ -0,0 +1,77 @@
|
||||
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
|
||||
Reference in New Issue
Block a user