pub fn simulate_states_parallel<M>(&self) -> Vec<(ID, S)>
    where
        M: Simulate<S>,
    {
        let spaces = &self.spaces;
        let space_ids = &self.space_ids;
        let graph = &self.graph;
        space_ids
            .par_iter()
            .map(|id| {
                let neighbor_states = graph
                    .neighbors(*id)
                    .map(|i| spaces[&i].state())
                    .collect::<Vec<&S>>();
                (*id, M::simulate(spaces[id].state(), &neighbor_states))
            }).collect()
    }
/// Performs simulation on QDF like `simulation_step_parallel()` but instead of applying
/// results to QDF, it returns simulated platonic space states along with their space ID.
///
/// # Returns
/// Vector of tuples of id and its updated space that were simulated.
Performs simulation on QDF like `simulation_step_parallel()` but instead of applying
results to QDF, it returns simulated platonic space states along with their space ID.
Performs simulation on QDF like ` simulation_step_parallel () ` but instead of applying results to QDF it returns simulated platonic space states along with their space ID .
pub fn simulate_states_parallel<M>(&self) -> Vec<(ID, S)>
    where
        M: Simulate<S>,
    {
        let spaces = &self.spaces;
        let space_ids = &self.space_ids;
        let graph = &self.graph;
        space_ids
            .par_iter()
            .map(|id| {
                let neighbor_states = graph
                    .neighbors(*id)
                    .map(|i| spaces[&i].state())
                    .collect::<Vec<&S>>();
                (*id, M::simulate(spaces[id].state(), &neighbor_states))
            }).collect()
    }
pub fn simulate_states_parallel < M > ( & self ) -> Vec < ( ID , S ) > where M : Simulate < S > , { let spaces = & self . spaces ; let space_ids = & self . space_ids ; let graph = & self . graph ; space_ids . par_iter ( ) . map ( | id | { let neighbor_states = graph . neighbors ( * id ) . map ( | i | spaces [ & i ] . state ( ) ) . collect :: < Vec < & S > > ( ) ; ( * id , M :: simulate ( spaces [ id ] . state ( ) , & neighbor_states ) ) } ) . collect ( ) }
Performs simulation on QDF like `simulation_step_parallel()` but instead of applying
results to QDF, it returns simulated platonic space states along with their space ID.
Performs simulation on QDF like ` simulation_step_parallel () ` but instead of applying results to QDF it returns simulated platonic space states along with their space ID .
&self
Vector of tuples of id and its updated space that were simulated.
Vector of tuples of id and its updated space that were simulated .
&self