pub struct SobolPlan {
pub dimensions: usize,
pub points: usize,
pub skip: u64,
pub scramble: Scramble,
pub seed: u64,
pub max_work: u64,
pub untested_regions: Vec<UntestedRegion>,
}Expand description
Sobol base-2 digital-net request. The reviewed direction table is bounded to four dimensions.
Fields§
§dimensions: usizeDimensions in 1..=4.
points: usizePoint count.
skip: u64Number of canonical prefix points to skip.
scramble: ScrambleScrambling policy.
seed: u64Seed used only by reviewed scrambling.
max_work: u64Maximum coordinate work.
untested_regions: Vec<UntestedRegion>Caller-owned exclusions.
Implementations§
Source§impl SobolPlan
impl SobolPlan
Sourcepub fn generate(&self) -> Result<SampleDesign, DesignError>
pub fn generate(&self) -> Result<SampleDesign, DesignError>
Generates the requested bounded Sobol prefix.
Examples found in repository?
examples/space_filling_evidence.rs (line 22)
3fn main() {
4 let latin = LatinHypercubePlan {
5 dimensions: 3,
6 points: 8,
7 seed: 2026,
8 max_work: 21,
9 untested_regions: vec![],
10 }
11 .generate()
12 .expect("bounded Latin design");
13 let sobol = SobolPlan {
14 dimensions: 2,
15 points: 8,
16 skip: 4,
17 scramble: Scramble::DigitalShift,
18 seed: 2026,
19 max_work: 16,
20 untested_regions: vec![],
21 }
22 .generate()
23 .expect("reviewed Sobol design");
24 let covered = SweepPlan {
25 inject_lower_boundary: true,
26 inject_upper_boundary: true,
27 untested_regions: vec![UntestedRegion {
28 label: "unstable-corner".into(),
29 reason: "excluded by study protocol".into(),
30 }],
31 }
32 .apply(sobol);
33 println!(
34 "latin={} occupancy={:?} sampler={:?}",
35 latin.points.len(),
36 latin.coverage.stratum_occupancy,
37 latin.coverage.sampler
38 );
39 println!(
40 "sobol={} boundaries={:?} duplicates={:?} exclusions={:?}",
41 covered.points.len(),
42 covered.coverage.boundary_injections,
43 covered.coverage.duplicates,
44 covered.coverage.untested_regions
45 );
46}Trait Implementations§
impl StructuralPartialEq for SobolPlan
Auto Trait Implementations§
impl Freeze for SobolPlan
impl RefUnwindSafe for SobolPlan
impl Send for SobolPlan
impl Sync for SobolPlan
impl Unpin for SobolPlan
impl UnsafeUnpin for SobolPlan
impl UnwindSafe for SobolPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more