pub struct GraphBaseline {
pub hop_counts: Vec<(SourceId, SourceId, u32)>,
pub hop_n: usize,
pub pair_counts: Vec<(SubjectId, SubjectId, u32)>,
pub pair_n: usize,
pub route_counts: Vec<(Vec<ZoneId>, u32)>,
pub route_n: usize,
}Expand description
Relational baseline histograms.
Fields§
§hop_counts: Vec<(SourceId, SourceId, u32)>(from, to, count) directed hop histogram.
hop_n: usizeTotal hops.
pair_counts: Vec<(SubjectId, SubjectId, u32)>Normalized co-occurrence pairs (a, b, count) with a.0 <= b.0.
pair_n: usizeTotal pairs.
route_counts: Vec<(Vec<ZoneId>, u32)>Zone route keys as sorted zone id lists + count.
route_n: usizeTotal routes.
Implementations§
Source§impl GraphBaseline
impl GraphBaseline
Sourcepub fn hop_fraction(&self, from: SourceId, to: SourceId) -> f32
pub fn hop_fraction(&self, from: SourceId, to: SourceId) -> f32
Fraction of hops on from → to.
Sourcepub fn pair_fraction(&self, a: SubjectId, b: SubjectId) -> f32
pub fn pair_fraction(&self, a: SubjectId, b: SubjectId) -> f32
Fraction of co-occurrence pairs.
Sourcepub fn route_fraction(&self, zones: &[ZoneId]) -> f32
pub fn route_fraction(&self, zones: &[ZoneId]) -> f32
Fraction of identical zone routes.
Trait Implementations§
Source§impl Clone for GraphBaseline
impl Clone for GraphBaseline
Source§impl Debug for GraphBaseline
impl Debug for GraphBaseline
Source§impl Default for GraphBaseline
impl Default for GraphBaseline
Source§impl PartialEq for GraphBaseline
impl PartialEq for GraphBaseline
impl StructuralPartialEq for GraphBaseline
Auto Trait Implementations§
impl Freeze for GraphBaseline
impl RefUnwindSafe for GraphBaseline
impl Send for GraphBaseline
impl Sync for GraphBaseline
impl Unpin for GraphBaseline
impl UnsafeUnpin for GraphBaseline
impl UnwindSafe for GraphBaseline
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