greta-dev / greta.dynamics

a greta extension for modelling dynamical systems
https://greta-dev.github.io/greta.dynamics/
Other
6 stars 2 forks source link

remove transposition of transition matrix in iterate_matrix and tests #14

Closed jdyen closed 5 years ago

jdyen commented 5 years ago

Following discussion in #5, set up to avoid matrix transposition in matrix multiplications. This is in line with standard usage in biology (n_{t+1} = A n_t).

Have not updated docs to reflect this. One option is to add an eqn to the @description of iterate_matrix, e.g.,

Calculate the intrinsic growth rate(s) and stable stage distribution(s) for a stage-structured dynamical system, encoded as \code{state_t = matrix %*% state_tm1}.

Alternatively, could add this information to @param matrix or in @details.

codecov[bot] commented 5 years ago

Codecov Report

Merging #14 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files           3        3           
  Lines         225      225           
=======================================
  Hits          208      208           
  Misses         17       17
Impacted Files Coverage Δ
R/iterate_matrix.R 94.21% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0f19a4d...48112e2. Read the comment docs.

goldingn commented 5 years ago

Yes, I think the suggested edit to description is best

jdyen commented 5 years ago

Have added that change to the descrition,

jdyen commented 5 years ago

And now wiht recreated Rd files and correct %*% formatting.

goldingn commented 5 years ago

Awesome, thanks. Let me know when you're ready for a review

jdyen commented 5 years ago

Good for review now.

goldingn commented 5 years ago

Yep, this looks great. Thanks!

Could you please bump the dev version number and the date up and I'll merge it.

goldingn commented 5 years ago

Awesome, thank you!