pub struct Populations { /* private fields */ }Expand description
The value populations an aggregate reduces over, per metric key. Two flavours
per the metric’s no-signal value (omit_at):
not_empty— only nodes whose value carries signal (≠omit_at);all— every applicable (internal) node, missing values counted at the floor (omit_at), so e.g. files with zero coupling honestly weigh in.
Lives beside [reduce]/[register_agg] (its reduce target) so the trio stays
in one module rather than splitting a mutual dependency across files.
Implementations§
Source§impl Populations
impl Populations
Sourcepub fn build(
rows: &[BTreeMap<String, f64>],
keys: &[String],
omit_at: &BTreeMap<String, f64>,
) -> Populations
pub fn build( rows: &[BTreeMap<String, f64>], keys: &[String], omit_at: &BTreeMap<String, f64>, ) -> Populations
Build both populations from each applicable node’s present numeric
attributes (rows), the set of metric keys, and each key’s omit_at.
Aggregation is over true computed values: a node missing a key contributes
the floor to all (and nothing to not_empty).
Trait Implementations§
Source§impl Clone for Populations
impl Clone for Populations
Source§fn clone(&self) -> Populations
fn clone(&self) -> Populations
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Populations
impl Debug for Populations
Source§impl Default for Populations
impl Default for Populations
Source§fn default() -> Populations
fn default() -> Populations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Populations
impl RefUnwindSafe for Populations
impl Send for Populations
impl Sync for Populations
impl Unpin for Populations
impl UnsafeUnpin for Populations
impl UnwindSafe for Populations
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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