#time #forward #iterating #simulation #models #graph #demes

demes-forward

rust API for iterating demes models forwards in time

8 releases (4 breaking)

0.5.0 Apr 16, 2024
0.4.0 Sep 26, 2023
0.3.0 Mar 30, 2023
0.2.1 Feb 8, 2023
0.1.0 Jul 21, 2022

#869 in Algorithms

Download history 637/week @ 2024-06-29 513/week @ 2024-07-06 716/week @ 2024-07-13 2/week @ 2024-07-20 387/week @ 2024-07-27 447/week @ 2024-08-03 2/week @ 2024-08-10 3/week @ 2024-08-17 42/week @ 2024-08-24 35/week @ 2024-08-31 16/week @ 2024-09-07 2/week @ 2024-09-14 17/week @ 2024-09-21 27/week @ 2024-09-28

62 downloads per month
Used in demes-forward-capi

MIT license

385KB
9K SLoC

Rust 7K SLoC // 0.0% comments Python 2K SLoC // 0.1% comments C 113 SLoC C++ 103 SLoC // 0.0% comments Shell 89 SLoC // 0.1% comments

demes-forward

This crate provides a rust API for iterating overs demes graphs forwards in time.


lib.rs:

Forward-time traversal of demes models.

Re-exports

This crate re-exports demes. Client code does not have to list demes as a cargo dependency, guaranteeing that a compatible version is available.

use demes_forward::demes;

let yaml = "
time_units: generations
demes:
 - name: a_deme
   epochs:
    - start_size: 100
";
assert!(demes::loads(yaml).is_ok());

Dependencies

~4.5–7MB
~125K SLoC