make this immutable again

This commit is contained in:
Mike J Innes 2017-03-29 17:47:43 +01:00
parent 2082d9db5c
commit 7e983c74cb

View File

@ -127,7 +127,7 @@ graph(cap::Capacitor) = cap.graph
# Recurrent Models
mutable struct Stateful <: Model
struct Stateful <: Model
model
state::Vector{Any}
end
@ -135,7 +135,7 @@ end
function (m::Stateful)(x)
runrawbatched(x) do x
state, y = runmodel(m.model, (m.state...,), x)
m.state = collect(state)
m.state .= state
return y
end
end