import { make_stratified_sample } from "./make_stratified_sample.js";

/**
 *
 * @param {number[]} result
 * @param {number} result_offset
 * @param {number} result_stride
 * @param {number} num_samples
 * @param {function():number} random
 */
export function generate_stratified_samples(result, result_offset, result_stride, num_samples, random) {

    const delta = 1 / num_samples;

    for (let i = 0; i < num_samples; ++i) {

        result[result_offset + i * result_stride] = make_stratified_sample(i, delta, random);
    }

}