#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

#991 in Algorithms

Download history 694/week @ 2024-07-29 142/week @ 2024-08-05 9/week @ 2024-08-19 71/week @ 2024-08-26 18/week @ 2024-09-09 20/week @ 2024-09-23 24/week @ 2024-09-30 99/week @ 2024-10-28 78/week @ 2024-11-04

177 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
~124K SLoC