You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: maxmin.rs
    path of file: ./repos/rs_pbrt/src/samplers
    
    the code of the file until where you have to start completion: // pbrt
use crate::core::geometry::{Point2f, Point2i};
use crate::core::lowdiscrepancy::C_MAX_MIN_DIST;
use crate::core::lowdiscrepancy::{sample_generator_matrix, sobol_2d, van_der_corput};
use crate::core::paramset::ParamSet;
use crate::core::pbrt::Float;
use crate::core::pbrt::{is_power_of_2, log_2_int_i64, round_up_pow2_32, round_up_pow2_64};
use crate
    
    pub fn new(samples_per_pixel: i64, n_sampled_dimensions: i64) -> Self {
        let mut samples_per_pixel: i64 = samples_per_pixel;
        let c_index: i32 = log_2_int_i64(samples_per_pixel) as i32;
        if c_index as usize >= 17_usize {
            panic!(
                "No more than {} samples per pixel are supported with MaxMinDistSampler.",
                c_index
            );
            //     Warning(
            //         "No more than %d samples per pixel are supported with "
            //             "MaxMinDistSampler. Rounding down.",
            //         (1 << int(sizeof(CMaxMinDist) / sizeof(CMaxMinDist[0]))) -
            //             1);
            //     spp =
            //         (1 << (sizeof(CMaxMinDist) / sizeof(CMaxMinDist[0]))) - 1;
        }
        if !is_power_of_2(samples_per_pixel) {
            samples_per_pixel = round_up_pow2_64(samples_per_pixel);
            println!(
                "WARNING: Non power-of-two sample count rounded up to {:?} for MaxMinDistSampler.",
                samples_per_pixel
            );
        }
        let c_index: i32 = log_2_int_i64(samples_per_pixel) as i32;
        assert!((0_i32..17).contains(&c_index));
        let mut mmds: MaxMinDistSampler = MaxMinDistSampler {
            samples_per_pixel,
            c_pixel: C_MAX_MIN_DIST[c_index as usize],
            samples_1d: Vec::new(),
            samples_2d: Vec::new(),
            current_1d_dimension: 0_i32,
            current_2d_dimension: 0_i32,
            rng: Rng::default(),
            current_pixel: Point2i::default(),
            current_pixel_sample_index: 0_i64,
            samples_1d_array_sizes: Vec::new(),
            samples_2d_array_sizes: Vec::new(),
            sample_array_1d: Vec::new(),
            sample_array_2d: Vec::new(),
            array_1d_offset: 0_usize,
            array_2d_offset: 0_usize,
        };
        for _i in 0..n_sampled_dimensions {
            let additional_1d: Vec<Float> = vec![0.0; mmds.samples_per_pixel as usize];
            let additional_2d: Vec<Point2f> =
                vec![Point2f::default(); mmds.samples_per_pixel as usize];
            mmds.samples_1d.push(additional_1d);
            mmds.samples_2d.push(additional_2d);
        }
        mmds
    }