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
|
||||
(initialize-scheduler! [this]
|
||||
"")
|
||||
"removes any propagators from schedule")
|
||||
(last-value-of-run [this]
|
||||
"")
|
||||
(simulate! [this]
|
||||
"")
|
||||
"makes one step through schedule")
|
||||
(halt! [this]
|
||||
""))
|
||||
|
||||
|
@ -61,20 +61,20 @@
|
|||
IPropNet
|
||||
|
||||
;; introspect methods INFO - complete
|
||||
(get-alerted-propagators [net] (deref-get net :alerted-propagators))
|
||||
(propagators-ever-alerted [net] (deref-get net :propagators-ever-alerted))
|
||||
(get-cells [net] (deref-get net :cells))
|
||||
(propagators [net] (deref-get net :all-propagators))
|
||||
(get-cell [net cell-key]
|
||||
(cell-key (get-cells net)))
|
||||
(cell-content [net cell-key] (deref-get (get-cell net cell-key)
|
||||
(get-alerted-propagators [this] (deref-get this :alerted-propagators))
|
||||
(propagators-ever-alerted [this] (deref-get this :propagators-ever-alerted))
|
||||
(get-cells [this] (deref-get this :cells))
|
||||
(propagators [this] (deref-get this :all-propagators))
|
||||
(get-cell [this cell-key]
|
||||
(cell-key (get-cells this)))
|
||||
(cell-content [this cell-key] (deref-get (get-cell this cell-key)
|
||||
:content))
|
||||
(propagator [net prop-key] (prop-key (propagators net)))
|
||||
(propagator [this prop-key] (prop-key (propagators this)))
|
||||
|
||||
;; mutation methods
|
||||
(add-cell! [net cell-key]
|
||||
(swap! (:cells net) assoc cell-key (c/make-cell))
|
||||
(get-cells net))
|
||||
(add-cell! [this cell-key]
|
||||
(swap! (:cells this) assoc cell-key (c/make-cell))
|
||||
(get-cells this))
|
||||
(add-content-to-cell! [this cell-key content]
|
||||
(let [cur-cell (get-cell this cell-key)]
|
||||
;; add the content
|
||||
|
@ -108,18 +108,18 @@
|
|||
output-setter)))
|
||||
|
||||
;; 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]
|
||||
(reset! (:alerted-propagators this) alerted-propagators*)
|
||||
(reset! (:last-value-of-run this) done)
|
||||
(reset! (:propagators-ever-alerted this) propagators-ever-alerted*)
|
||||
:ok)
|
||||
(simulate! [net]
|
||||
(simulate! [this]
|
||||
(run! (fn [prop-key]
|
||||
(do (swap! (:alerted-propagators net) disj prop-key)
|
||||
(p/apply! (propagator net prop-key))))
|
||||
(vec (get-alerted-propagators net))))
|
||||
;; (halt! [net])
|
||||
(do (swap! (:alerted-propagators this) disj prop-key)
|
||||
(p/apply! (propagator this prop-key))))
|
||||
(vec (get-alerted-propagators this))))
|
||||
;; (halt! [this])
|
||||
)
|
||||
|
||||
;; returns a propnet
|
||||
|
|
Loading…
Reference in a new issue