pub struct AmountFactors {
pub near_common_amount: bool,
pub just_below_threshold: bool,
pub small_relative_percentage: bool,
pub std_deviations_from_mean: f64,
}Expand description
Amount-related factors affecting detection difficulty.
Fields§
§near_common_amount: boolAmount is close to a common/expected value.
just_below_threshold: boolAmount is just below a threshold.
small_relative_percentage: boolAmount represents small percentage of total activity.
std_deviations_from_mean: f64Standard deviations from mean (lower = harder to detect).
Implementations§
Source§impl AmountFactors
impl AmountFactors
Sourcepub fn with_common_amount(self) -> Self
pub fn with_common_amount(self) -> Self
Sets near common amount flag.
Sourcepub fn just_below_threshold(self) -> Self
pub fn just_below_threshold(self) -> Self
Sets just below threshold flag.
Sourcepub fn with_small_percentage(self) -> Self
pub fn with_small_percentage(self) -> Self
Sets small relative percentage flag.
Sourcepub fn with_std_devs(self, std_devs: f64) -> Self
pub fn with_std_devs(self, std_devs: f64) -> Self
Sets standard deviations from mean.
Sourcepub fn difficulty_contribution(&self) -> f64
pub fn difficulty_contribution(&self) -> f64
Calculates the total difficulty contribution from amount factors.
Trait Implementations§
Source§impl Clone for AmountFactors
impl Clone for AmountFactors
Source§fn clone(&self) -> AmountFactors
fn clone(&self) -> AmountFactors
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AmountFactors
impl Debug for AmountFactors
Source§impl Default for AmountFactors
impl Default for AmountFactors
Source§fn default() -> AmountFactors
fn default() -> AmountFactors
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AmountFactors
impl<'de> Deserialize<'de> for AmountFactors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AmountFactors
impl RefUnwindSafe for AmountFactors
impl Send for AmountFactors
impl Sync for AmountFactors
impl Unpin for AmountFactors
impl UnwindSafe for AmountFactors
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