pub struct SamplingPlanGenerator { /* private fields */ }Expand description
Generator for ISA 530 sampling plans and sampled items.
Implementations§
Source§impl SamplingPlanGenerator
impl SamplingPlanGenerator
Sourcepub fn with_config(seed: u64, config: SamplingPlanGeneratorConfig) -> Self
pub fn with_config(seed: u64, config: SamplingPlanGeneratorConfig) -> Self
Create a new generator with custom configuration.
Sourcepub fn generate_for_cras(
&mut self,
cras: &[CombinedRiskAssessment],
tolerable_error: Option<Decimal>,
) -> (Vec<SamplingPlan>, Vec<SampledItem>)
pub fn generate_for_cras( &mut self, cras: &[CombinedRiskAssessment], tolerable_error: Option<Decimal>, ) -> (Vec<SamplingPlan>, Vec<SampledItem>)
Generate sampling plans and sampled items for all CRAs at Moderate or higher.
§Arguments
cras— All combined risk assessments for one or more entities.tolerable_error— Performance materiality / tolerable error for the entity. WhenNone, a synthetic TE of 5% of the base population value is used.
Returns (plans, sampled_items) — the plans and the flat list of all sampled items.
Sourcepub fn generate_for_cras_with_population(
&mut self,
cras: &[CombinedRiskAssessment],
tolerable_error: Option<Decimal>,
journal_entries: &[JournalEntry],
) -> (Vec<SamplingPlan>, Vec<SampledItem>)
pub fn generate_for_cras_with_population( &mut self, cras: &[CombinedRiskAssessment], tolerable_error: Option<Decimal>, journal_entries: &[JournalEntry], ) -> (Vec<SamplingPlan>, Vec<SampledItem>)
Generate sampling plans using real journal entry population data.
Key items are actual JE lines with amount > tolerable_error. Representative items are sampled from the remaining JE population. Falls back to synthetic generation for CRAs with no matching JE lines.
Auto Trait Implementations§
impl Freeze for SamplingPlanGenerator
impl RefUnwindSafe for SamplingPlanGenerator
impl Send for SamplingPlanGenerator
impl Sync for SamplingPlanGenerator
impl Unpin for SamplingPlanGenerator
impl UnsafeUnpin for SamplingPlanGenerator
impl UnwindSafe for SamplingPlanGenerator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.