pub struct SweepPlan {
pub inject_lower_boundary: bool,
pub inject_upper_boundary: bool,
pub untested_regions: Vec<UntestedRegion>,
}Expand description
Boundary-injection wrapper for any already generated unit-cube design.
Fields§
§inject_lower_boundary: boolWhether to prepend the all-zero corner.
inject_upper_boundary: boolWhether to append the all-one corner.
untested_regions: Vec<UntestedRegion>Caller-owned exclusions.
Implementations§
Source§impl SweepPlan
impl SweepPlan
Sourcepub fn apply(&self, design: SampleDesign) -> SampleDesign
pub fn apply(&self, design: SampleDesign) -> SampleDesign
Injects requested exact boundaries and recomputes duplicate evidence.
Examples found in repository?
examples/space_filling_evidence.rs (line 32)
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 SweepPlan
Auto Trait Implementations§
impl Freeze for SweepPlan
impl RefUnwindSafe for SweepPlan
impl Send for SweepPlan
impl Sync for SweepPlan
impl Unpin for SweepPlan
impl UnsafeUnpin for SweepPlan
impl UnwindSafe for SweepPlan
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