pub fn sim_fundata(
n: usize,
t: &[f64],
big_m: usize,
efun_type: EFunType,
eval_type: EValType,
seed: Option<u64>,
) -> FdMatrixExpand description
Simulate functional data with specified eigenfunction and eigenvalue types.
Convenience function that combines eigenfunction and eigenvalue generation with KL simulation.
§Arguments
n- Number of curves to generatet- Evaluation pointsbig_m- Number of eigenfunctions/eigenvalues to useefun_type- Type of eigenfunction basiseval_type- Type of eigenvalue decayseed- Optional random seed
§Returns
Data FdMatrix of size n × len(t)
§Examples
use fdars_core::simulation::{sim_fundata, EFunType, EValType};
let t: Vec<f64> = (0..20).map(|i| i as f64 / 19.0).collect();
let data = sim_fundata(5, &t, 4, EFunType::Fourier, EValType::Linear, Some(42));
assert_eq!(data.shape(), (5, 20));
assert!(data.as_slice().iter().all(|v| v.is_finite()));