macro_rules! sfs1d {
($elem:expr; $n:expr) => { ... };
($($x:expr),+ $(,)?) => { ... };
}Expand description
Creates an unnormalised 1D SFS.
This is mainly intended for readability in doc-tests, but may also be useful elsewhere.
ยงExamples
Create SFS by repeating an element:
use winsfs_core::sfs1d;
let sfs = sfs1d![0.1; 10];
assert!(sfs.iter().all(|&x| x == 0.1));Create SFS from a list of elements:
use winsfs_core::sfs1d;
let sfs = sfs1d![0.1, 0.2, 0.3];
assert_eq!(sfs[[0]], 0.1);
assert_eq!(sfs[[1]], 0.2);
assert_eq!(sfs[[2]], 0.3);