From 30d493b240f49522246f48b4d9f9200d2a6dd529 Mon Sep 17 00:00:00 2001 From: AlessandroBregoli Date: Fri, 25 Feb 2022 14:28:44 +0100 Subject: [PATCH] bugfix --- src/tools.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools.rs b/src/tools.rs index 8f297fd..8a73a7a 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -33,13 +33,14 @@ pub fn trajectory_generator(net: &Box, n_trajectories: u64 }).collect()); time.push(t.clone()); while t < t_end { - next_transitions.iter_mut().enumerate().map(|(idx, val)| { + for (idx, val) in next_transitions.iter_mut().enumerate(){ if let None = val { *val = Some(net.get_node(idx) .get_random_residence_time(net.get_node(idx).state_to_index(¤t_state[idx]), net.get_param_index_network(idx, ¤t_state)).unwrap() + t); } - }); + }; + let next_node_transition = next_transitions .iter() .enumerate()