pub struct CollapseStats {
pub total_components: usize,
pub targets_found: usize,
pub nodes_considered: usize,
pub bfs_distance_distribution: Vec<usize>,
pub hamming_distance_distribution: Vec<usize>,
}Expand description
Tallies accumulated over graph-collapse searches.
The distance distributions are dense vectors indexed by distance, so the
count of matches at distance d is at index d. A vector is only as long
as the largest distance seen, and the accessors skip distances with no match.
Fields§
§total_components: usizeComponents searched. graph_collapse leaves
this at 0, and the caller adds components with add_components.
targets_found: usizeKept matches. A match dropped for closing a loop is not counted.
nodes_considered: usizeNodes whose degree was at most max_degree, so were searched.
bfs_distance_distribution: Vec<usize>Kept matches by graph hops from the node to its match.
hamming_distance_distribution: Vec<usize>Kept matches by Hamming distance between the node’s UMI and its match’s.
Implementations§
Source§impl CollapseStats
impl CollapseStats
Sourcepub fn add_target_stats(&mut self, bfs_dist: usize, hamming_dist: usize)
pub fn add_target_stats(&mut self, bfs_dist: usize, hamming_dist: usize)
Records one kept match, bfs_dist hops away and hamming_dist symbols apart.
Sourcepub fn add_considered_nodes(&mut self, n_considered_nodes: usize)
pub fn add_considered_nodes(&mut self, n_considered_nodes: usize)
Adds n_considered_nodes to the count of nodes that were searched.
Sourcepub fn add_components(&mut self, n_components: usize)
pub fn add_components(&mut self, n_components: usize)
Adds n_components to the count of components searched.
Sourcepub fn bfs_distance_counts(&self) -> Vec<(usize, usize)>
pub fn bfs_distance_counts(&self) -> Vec<(usize, usize)>
(hops, matches) pairs in ascending hop order, for hop counts that
occurred at least once.
Sourcepub fn hamming_distance_counts(&self) -> Vec<(usize, usize)>
pub fn hamming_distance_counts(&self) -> Vec<(usize, usize)>
(distance, matches) pairs in ascending distance order, for Hamming
distances that occurred at least once.
Trait Implementations§
Source§impl AddAssign for CollapseStats
impl AddAssign for CollapseStats
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+= operation. Read moreSource§impl Clone for CollapseStats
impl Clone for CollapseStats
Source§fn clone(&self) -> CollapseStats
fn clone(&self) -> CollapseStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for CollapseStats
impl Default for CollapseStats
Source§fn default() -> CollapseStats
fn default() -> CollapseStats
Auto Trait Implementations§
impl Freeze for CollapseStats
impl RefUnwindSafe for CollapseStats
impl Send for CollapseStats
impl Sync for CollapseStats
impl Unpin for CollapseStats
impl UnsafeUnpin for CollapseStats
impl UnwindSafe for CollapseStats
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<N, A, B> MulAcc<A, B> for N
impl<N, A, B> MulAcc<A, B> for N
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.