pub struct ThresholdsInput {
pub pattern_entropy_rate: f64,
pub convention_drift_rate: f64,
pub coupling_delta_rate: f64,
pub boundary_violation_rate: f64,
pub overrides: BTreeMap<String, ThresholdOverrideInput>,
pub today: NaiveDate,
}Expand description
Threshold configuration for crate::compute_thresholds_check.
The caller supplies today explicitly — no clock access in sdivi-core.
IMPORTANT: ThresholdsInput::default() sets today to a far-future
sentinel (9999-12-31) so that all per-category overrides are treated as
expired (i.e., the global rates apply). Callers that use per-category
overrides MUST supply the real current date:
use sdivi_core::input::ThresholdsInput;
let today = NaiveDate::from_ymd_opt(2026, 4, 30).unwrap();
let t = ThresholdsInput { today, ..ThresholdsInput::default() };
assert_eq!(t.pattern_entropy_rate, 2.0);Fields§
§pattern_entropy_rate: f64Maximum allowed pattern entropy rate.
convention_drift_rate: f64Maximum allowed convention drift rate.
coupling_delta_rate: f64Maximum allowed coupling delta rate.
boundary_violation_rate: f64Maximum allowed boundary violation rate.
overrides: BTreeMap<String, ThresholdOverrideInput>Per-category overrides (may include expired entries — today determines which apply).
today: NaiveDateToday’s date for expiry evaluation. Caller supplies this (no clock in sdivi-core).
Default uses 9999-12-31; override with the real date to enable per-category filtering.
Trait Implementations§
Source§impl Clone for ThresholdsInput
impl Clone for ThresholdsInput
Source§fn clone(&self) -> ThresholdsInput
fn clone(&self) -> ThresholdsInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more