Struct fbas_analyzer::NodeIdSetVecResult
source · pub struct NodeIdSetVecResult { /* private fields */ }
Expand description
Wraps a vector of node ID sets. Node ID sets are stored in shrunken form to preserve memory.
Implementations§
source§impl NodeIdSetVecResult
impl NodeIdSetVecResult
pub fn unwrap(self) -> Vec<NodeIdSet>
pub fn into_vec_vec(self) -> Vec<Vec<NodeId>>
pub fn involved_nodes(&self) -> NodeIdSet
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains_empty_set(&self) -> bool
sourcepub fn describe(&self) -> (usize, usize, (usize, usize, f64), Vec<usize>)
pub fn describe(&self) -> (usize, usize, (usize, usize, f64), Vec<usize>)
Returns (number_of_sets, number_of_distinct_nodes, <minmaxmean_set_size>,
sourcepub fn minmaxmean(&self) -> (usize, usize, f64)
pub fn minmaxmean(&self) -> (usize, usize, f64)
Returns (min_set_size, max_set_size, mean_set_size)
sourcepub fn histogram(&self) -> Vec<usize>
pub fn histogram(&self) -> Vec<usize>
Returns [ #members with size 0, #members with size 1, … , #members with maximum size ]
sourcepub fn merged_by_group(&self, groupings: &Groupings<'_>) -> Self
pub fn merged_by_group(&self, groupings: &Groupings<'_>) -> Self
Merge contained nodes so that all nodes of the same grouping get the same ID.
The remaining node sets might be non-minimal w.r.t. each other, or contain duplicates!
You will usually want to chain this with .minimal_sets()
.
sourcepub fn minimal_sets(&self) -> Self
pub fn minimal_sets(&self) -> Self
Removes all non-minimal sets and sorts the remaining sets.
pub fn without_nodes(&self, nodes: &[NodeId]) -> Self
pub fn without_nodes_pretty( &self, nodes: &[String], fbas: &Fbas, groupings: Option<&Groupings<'_>> ) -> Self
source§impl NodeIdSetVecResult
impl NodeIdSetVecResult
sourcepub fn into_pretty_vec_vec(
self,
fbas: &Fbas,
groupings: Option<&Groupings<'_>>
) -> Vec<Vec<String>>
pub fn into_pretty_vec_vec( self, fbas: &Fbas, groupings: Option<&Groupings<'_>> ) -> Vec<Vec<String>>
Transforms result into a vector of vectors of public keys and/or grouping names. The passed FBAS should be the same as the one used for analysis, otherwise the IDs might not not match. Preserves the original (typically node ID-based) ordering.
Trait Implementations§
source§impl AnalysisResult for NodeIdSetVecResult
impl AnalysisResult for NodeIdSetVecResult
fn into_id_string(self) -> String
fn into_pretty_string( self, fbas: &Fbas, groupings: Option<&Groupings<'_>> ) -> String
fn into_describe_string(self) -> String
source§impl Clone for NodeIdSetVecResult
impl Clone for NodeIdSetVecResult
source§fn clone(&self) -> NodeIdSetVecResult
fn clone(&self) -> NodeIdSetVecResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NodeIdSetVecResult
impl Debug for NodeIdSetVecResult
source§impl Default for NodeIdSetVecResult
impl Default for NodeIdSetVecResult
source§fn default() -> NodeIdSetVecResult
fn default() -> NodeIdSetVecResult
source§impl Hash for NodeIdSetVecResult
impl Hash for NodeIdSetVecResult
source§impl PartialEq for NodeIdSetVecResult
impl PartialEq for NodeIdSetVecResult
source§fn eq(&self, other: &NodeIdSetVecResult) -> bool
fn eq(&self, other: &NodeIdSetVecResult) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NodeIdSetVecResult
impl Serialize for NodeIdSetVecResult
impl Eq for NodeIdSetVecResult
impl StructuralEq for NodeIdSetVecResult
impl StructuralPartialEq for NodeIdSetVecResult
Auto Trait Implementations§
impl RefUnwindSafe for NodeIdSetVecResult
impl Send for NodeIdSetVecResult
impl Sync for NodeIdSetVecResult
impl Unpin for NodeIdSetVecResult
impl UnwindSafe for NodeIdSetVecResult
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.