fn generate_int_space_state(lbound: usize, ubound: usize, step: usize) -> Vec<usize> {
        let mut res_vec = Vec::new();
        let num_it = (ubound - lbound) / step;
        for x in 0..num_it {
            res_vec.push(lbound + (step * x));
            if x == num_it - 1 {
                res_vec.push(lbound + (step * (x + 1)));
            }
        }
        // Randomize the order of vector elements
        rand::thread_rng().shuffle(&mut res_vec);
        return res_vec;
    }
/***
	Private function useful to generate the whole space state for each integer parameter based on the [min:max:step] values
	given in input by the user.
	***/
Private function useful to generate the whole space state for each integer parameter based on the [min:max:step] values
given in input by the user.
Private function useful to generate the whole space state for each integer parameter based on the [ min : max : step ] values given in input by the user .
fn generate_int_space_state(lbound: usize, ubound: usize, step: usize) -> Vec<usize> {
        let mut res_vec = Vec::new();
        let num_it = (ubound - lbound) / step;
        for x in 0..num_it {
            res_vec.push(lbound + (step * x));
            if x == num_it - 1 {
                res_vec.push(lbound + (step * (x + 1)));
            }
        }
        // Randomize the order of vector elements
        rand::thread_rng().shuffle(&mut res_vec);
        return res_vec;
    }
fn generate_int_space_state ( lbound : usize , ubound : usize , step : usize ) -> Vec < usize > { let mut res_vec = Vec :: new ( ) ; let num_it = ( ubound - lbound ) / step ; for x in 0 .. num_it { res_vec . push ( lbound + ( step * x ) ) ; if x == num_it - 1 { res_vec . push ( lbound + ( step * ( x + 1 ) ) ) ; } } // Randomize the order of vector elements rand :: thread_rng ( ) . shuffle ( & mut res_vec ) ; return res_vec ; }
Private function useful to generate the whole space state for each integer parameter based on the [min:max:step] values
given in input by the user.
Private function useful to generate the whole space state for each integer parameter based on the [ min : max : step ] values given in input by the user .
lbound
usize
ubound
usize
step
usize