pub struct DivergenceSummary {
pub pattern_entropy_delta: Option<f64>,
pub convention_drift_delta: Option<f64>,
pub coupling_delta: Option<f64>,
pub community_count_delta: Option<i64>,
pub boundary_violation_delta: Option<i64>,
pub pattern_entropy_per_category_delta: Option<BTreeMap<String, f64>>,
pub convention_drift_per_category_delta: Option<BTreeMap<String, f64>>,
}Expand description
Per-dimension divergence between two consecutive Snapshots.
All fields are Option<_>. None means the dimension could not be
compared (e.g. one snapshot lacked the prerequisite data). Some(0)
or Some(0.0) means the dimension was compared and no change was
observed. These two states are intentionally distinct (Rule 14 / KDD-9).
Null fields are serialised as explicit JSON null — skip_serializing_if
is intentionally absent — so that CI consumers can distinguish “not
computed” from “zero change.”
§Examples
use sdivi_snapshot::delta::null_summary;
let s = null_summary();
assert!(s.pattern_entropy_delta.is_none());
assert!(s.convention_drift_delta.is_none());
assert!(s.pattern_entropy_per_category_delta.is_none());
assert!(s.convention_drift_per_category_delta.is_none());Fields§
§pattern_entropy_delta: Option<f64>Change in total normalized pattern entropy (curr − prev).
convention_drift_delta: Option<f64>Change in convention_drift (curr − prev).
None when either snapshot has no catalog entries.
coupling_delta: Option<f64>Change in graph density (curr − prev).
community_count_delta: Option<i64>Change in community count (curr − prev), as a signed integer.
boundary_violation_delta: Option<i64>Change in boundary violation count (curr − prev).
None when either snapshot is missing intent_divergence.
pattern_entropy_per_category_delta: Option<BTreeMap<String, f64>>Per-category Shannon entropy delta (curr − prev), keyed by category name.
None on the first-snapshot path (KDD-9). Map keys are the union of
categories in prev and curr; missing-side values are treated as 0.0.
convention_drift_per_category_delta: Option<BTreeMap<String, f64>>Per-category convention-drift delta (curr − prev), keyed by category name.
None on the first-snapshot path (KDD-9). Same union-of-keys semantics as
pattern_entropy_per_category_delta.
Trait Implementations§
Source§impl Clone for DivergenceSummary
impl Clone for DivergenceSummary
Source§fn clone(&self) -> DivergenceSummary
fn clone(&self) -> DivergenceSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DivergenceSummary
impl Debug for DivergenceSummary
Source§impl<'de> Deserialize<'de> for DivergenceSummary
impl<'de> Deserialize<'de> for DivergenceSummary
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DivergenceSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DivergenceSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DivergenceSummary
impl PartialEq for DivergenceSummary
Source§fn eq(&self, other: &DivergenceSummary) -> bool
fn eq(&self, other: &DivergenceSummary) -> bool
self and other values to be equal, and is used by ==.