pub struct BenfordViolationStrategy {
pub target_digits: Vec<u32>,
pub rebalance_entry: bool,
}Expand description
Strategy for Benford’s Law violations.
Fields§
§target_digits: Vec<u32>Target first digits (rarely occurring).
rebalance_entry: boolWhether to rebalance the entry after modification.
Trait Implementations§
Source§impl Default for BenfordViolationStrategy
impl Default for BenfordViolationStrategy
Source§impl InjectionStrategy for BenfordViolationStrategy
impl InjectionStrategy for BenfordViolationStrategy
Source§fn can_apply(&self, entry: &JournalEntry) -> bool
fn can_apply(&self, entry: &JournalEntry) -> bool
Whether this strategy can be applied to the given entry.
Source§fn apply<R: Rng>(
&self,
entry: &mut JournalEntry,
_anomaly_type: &AnomalyType,
rng: &mut R,
) -> InjectionResult
fn apply<R: Rng>( &self, entry: &mut JournalEntry, _anomaly_type: &AnomalyType, rng: &mut R, ) -> InjectionResult
Applies the strategy to modify an entry.
Auto Trait Implementations§
impl Freeze for BenfordViolationStrategy
impl RefUnwindSafe for BenfordViolationStrategy
impl Send for BenfordViolationStrategy
impl Sync for BenfordViolationStrategy
impl Unpin for BenfordViolationStrategy
impl UnwindSafe for BenfordViolationStrategy
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