pub struct LabelPropagationReport { /* private fields */ }Expand description
Observable label-propagation results for declarative graph input.
§Examples
use whitaker_common::test_support::decomposition::{
EdgeInput, label_propagation_report,
};
let report = label_propagation_report(
&["gamma", "alpha", "beta"],
&[EdgeInput {
left: 0,
right: 1,
weight: 5,
}],
1,
)
.expect("valid input");
assert_eq!(report.labels().len(), 3);Implementations§
Source§impl LabelPropagationReport
impl LabelPropagationReport
Sourcepub fn label_of(&self, node: usize) -> Option<usize>
pub fn label_of(&self, node: usize) -> Option<usize>
Returns the propagated label for node, or None if it is out of
range.
Sourcepub fn iteration_count(&self) -> usize
pub fn iteration_count(&self) -> usize
Returns the number of propagation passes performed.
Sourcepub fn has_active_nodes(&self) -> bool
pub fn has_active_nodes(&self) -> bool
Returns true when the graph contains at least one active node.
Sourcepub fn all_labels_in_bounds(&self) -> bool
pub fn all_labels_in_bounds(&self) -> bool
Returns true when every label is a valid node index.
Trait Implementations§
Source§impl Clone for LabelPropagationReport
impl Clone for LabelPropagationReport
Source§fn clone(&self) -> LabelPropagationReport
fn clone(&self) -> LabelPropagationReport
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 LabelPropagationReport
impl Debug for LabelPropagationReport
impl Eq for LabelPropagationReport
Source§impl PartialEq for LabelPropagationReport
impl PartialEq for LabelPropagationReport
impl StructuralPartialEq for LabelPropagationReport
Auto Trait Implementations§
impl Freeze for LabelPropagationReport
impl RefUnwindSafe for LabelPropagationReport
impl Send for LabelPropagationReport
impl Sync for LabelPropagationReport
impl Unpin for LabelPropagationReport
impl UnsafeUnpin for LabelPropagationReport
impl UnwindSafe for LabelPropagationReport
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