pub struct MstResult {
pub edges: Vec<(NodeId, NodeId, EdgeId, f64)>,
pub total_weight: f64,
}Expand description
Result of MST algorithms.
Fields§
§edges: Vec<(NodeId, NodeId, EdgeId, f64)>Edges in the MST: (source, target, edge_id, weight)
total_weight: f64Total weight of the MST.
Implementations§
Source§impl MstResult
impl MstResult
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Returns the number of edges in the MST.
Sourcepub fn is_spanning_tree(&self, node_count: usize) -> bool
pub fn is_spanning_tree(&self, node_count: usize) -> bool
Returns true if this is a valid spanning tree for n nodes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MstResult
impl RefUnwindSafe for MstResult
impl Send for MstResult
impl Sync for MstResult
impl Unpin for MstResult
impl UnwindSafe for MstResult
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