Function pmcore::routines::initialization::latin::generate

source ·
pub fn generate(
    n_points: usize,
    range_params: &Vec<(f64, f64)>,
    seed: usize,
) -> Result<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>>
Expand description

Generates a 2-dimensional array containing Latin Hypercube Sampling points within the given ranges.

This function samples the space using a Latin Hypercube Sampling of n_points points, distributed along range_params.len() dimensions.

§Arguments

  • n_points - The number of points in the Latin Hypercube Sampling.
  • range_params - A vector of tuples, where each tuple represents the minimum and maximum value of a parameter.
  • seed - The seed for the random number generator.

§Returns

A 2D array where each row is a point in the Latin Hypercube Sampling, and each column corresponds to a parameter. The value of each parameter is scaled to be within the corresponding range.