fix inconsistent record parameter naming in naive_scalar_net
This commit is contained in:
parent
02d2a56931
commit
7d0a1319ac
1 changed files with 19 additions and 19 deletions
|
@ -42,11 +42,11 @@
|
||||||
|
|
||||||
;; run methods
|
;; run methods
|
||||||
(initialize-scheduler! [this]
|
(initialize-scheduler! [this]
|
||||||
"")
|
"removes any propagators from schedule")
|
||||||
(last-value-of-run [this]
|
(last-value-of-run [this]
|
||||||
"")
|
"")
|
||||||
(simulate! [this]
|
(simulate! [this]
|
||||||
"")
|
"makes one step through schedule")
|
||||||
(halt! [this]
|
(halt! [this]
|
||||||
""))
|
""))
|
||||||
|
|
||||||
|
@ -61,20 +61,20 @@
|
||||||
IPropNet
|
IPropNet
|
||||||
|
|
||||||
;; introspect methods INFO - complete
|
;; introspect methods INFO - complete
|
||||||
(get-alerted-propagators [net] (deref-get net :alerted-propagators))
|
(get-alerted-propagators [this] (deref-get this :alerted-propagators))
|
||||||
(propagators-ever-alerted [net] (deref-get net :propagators-ever-alerted))
|
(propagators-ever-alerted [this] (deref-get this :propagators-ever-alerted))
|
||||||
(get-cells [net] (deref-get net :cells))
|
(get-cells [this] (deref-get this :cells))
|
||||||
(propagators [net] (deref-get net :all-propagators))
|
(propagators [this] (deref-get this :all-propagators))
|
||||||
(get-cell [net cell-key]
|
(get-cell [this cell-key]
|
||||||
(cell-key (get-cells net)))
|
(cell-key (get-cells this)))
|
||||||
(cell-content [net cell-key] (deref-get (get-cell net cell-key)
|
(cell-content [this cell-key] (deref-get (get-cell this cell-key)
|
||||||
:content))
|
:content))
|
||||||
(propagator [net prop-key] (prop-key (propagators net)))
|
(propagator [this prop-key] (prop-key (propagators this)))
|
||||||
|
|
||||||
;; mutation methods
|
;; mutation methods
|
||||||
(add-cell! [net cell-key]
|
(add-cell! [this cell-key]
|
||||||
(swap! (:cells net) assoc cell-key (c/make-cell))
|
(swap! (:cells this) assoc cell-key (c/make-cell))
|
||||||
(get-cells net))
|
(get-cells this))
|
||||||
(add-content-to-cell! [this cell-key content]
|
(add-content-to-cell! [this cell-key content]
|
||||||
(let [cur-cell (get-cell this cell-key)]
|
(let [cur-cell (get-cell this cell-key)]
|
||||||
;; add the content
|
;; add the content
|
||||||
|
@ -108,18 +108,18 @@
|
||||||
output-setter)))
|
output-setter)))
|
||||||
|
|
||||||
;; run methods
|
;; run methods
|
||||||
(last-value-of-run [net] (deref-get net :last-value-of-run))
|
(last-value-of-run [this] (deref-get this :last-value-of-run))
|
||||||
(initialize-scheduler! [this]
|
(initialize-scheduler! [this]
|
||||||
(reset! (:alerted-propagators this) alerted-propagators*)
|
(reset! (:alerted-propagators this) alerted-propagators*)
|
||||||
(reset! (:last-value-of-run this) done)
|
(reset! (:last-value-of-run this) done)
|
||||||
(reset! (:propagators-ever-alerted this) propagators-ever-alerted*)
|
(reset! (:propagators-ever-alerted this) propagators-ever-alerted*)
|
||||||
:ok)
|
:ok)
|
||||||
(simulate! [net]
|
(simulate! [this]
|
||||||
(run! (fn [prop-key]
|
(run! (fn [prop-key]
|
||||||
(do (swap! (:alerted-propagators net) disj prop-key)
|
(do (swap! (:alerted-propagators this) disj prop-key)
|
||||||
(p/apply! (propagator net prop-key))))
|
(p/apply! (propagator this prop-key))))
|
||||||
(vec (get-alerted-propagators net))))
|
(vec (get-alerted-propagators this))))
|
||||||
;; (halt! [net])
|
;; (halt! [this])
|
||||||
)
|
)
|
||||||
|
|
||||||
;; returns a propnet
|
;; returns a propnet
|
||||||
|
|
Loading…
Reference in a new issue