(evolve {:keys [initial-state] :as opts})Returns a fragment that uses the supplied derivative function :f' to evolve
the state value stored in :atom.
On every time tick, the component will swap a new JS array representing the
flattened state value into :atom under the :state key.
Required arguments:
:f': a function of 2-arguments state and output, that populates
output with the derivatives for each entry in state when called
:atom: atom holding a map with a key :state populated with
the (potentially structured, unflattened) initial value for :f''s state
argument
Optional arguments:
:initial-state: structure in the shape of the state required by :f',
used if :f' is a function that needs to be compiled (ie not a quoted literal
function).
:epsilon: - :epsilon: error tolerance passed along
to odex-js. Defaults to 1e-6.
:max-steps: the maximum number of steps that the ODE solver will take
before erroring out. Defaults to 10000.
Returns a fragment that uses the supplied derivative function `:f'` to evolve the state value stored in `:atom`. On every time tick, the component will swap a new JS array representing the flattened state value into `:atom` under the `:state` key. Required arguments: - `:f'`: a function of 2-arguments `state` and `output`, that populates `output` with the derivatives for each entry in `state` when called - `:atom`: atom holding a map with a key `:state` populated with the (potentially structured, unflattened) initial value for `:f'`'s `state` argument Optional arguments: - `:initial-state`: structure in the shape of the state required by `:f'`, used if `:f'` is a function that needs to be compiled (ie not a quoted literal function). - `:epsilon`: - `:epsilon`: error tolerance passed along to [odex-js](https://github.com/littleredcomputer/odex-js). Defaults to 1e-6. - `:max-steps`: the maximum number of steps that the ODE solver will take before erroring out. Defaults to 10000.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |