pub struct Backbone { /* private fields */ }Expand description
A spanning-forest backbone that maintains connectivity guarantees.
When an edge is inserted, it is added to the backbone forest if and only if it connects two previously disconnected components. When a backbone edge is deleted, the backbone attempts to find a replacement edge from the set of known non-backbone edges to restore connectivity.
Implementations§
Trait Implementations§
Source§impl BackboneStrategy for Backbone
impl BackboneStrategy for Backbone
Source§fn insert_edge(&mut self, u: usize, v: usize, _weight: f64) -> bool
fn insert_edge(&mut self, u: usize, v: usize, _weight: f64) -> bool
Insert an edge, potentially adding it to the backbone. Read more
Source§fn delete_edge(&mut self, u: usize, v: usize, _weight: f64) -> bool
fn delete_edge(&mut self, u: usize, v: usize, _weight: f64) -> bool
Delete an edge, repairing the backbone if needed. Read more
Source§fn is_backbone_edge(&self, u: usize, v: usize) -> bool
fn is_backbone_edge(&self, u: usize, v: usize) -> bool
Check whether an edge is currently in the backbone.
Source§fn num_components(&self) -> usize
fn num_components(&self) -> usize
Return the number of connected components.
Source§fn connected(&mut self, u: usize, v: usize) -> bool
fn connected(&mut self, u: usize, v: usize) -> bool
Check whether two vertices are in the same component.
Source§fn backbone_edge_count(&self) -> usize
fn backbone_edge_count(&self) -> usize
Return the number of edges in the backbone.
Source§fn ensure_capacity(&mut self, n: usize)
fn ensure_capacity(&mut self, n: usize)
Ensure the backbone can accommodate at least
n vertices.Source§impl<'de> Deserialize<'de> for Backbone
impl<'de> Deserialize<'de> for Backbone
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Backbone
impl RefUnwindSafe for Backbone
impl Send for Backbone
impl Sync for Backbone
impl Unpin for Backbone
impl UnsafeUnpin for Backbone
impl UnwindSafe for Backbone
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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