[−][src]Struct libjp::resolver::CycleResolver
A utility for interactively removing cycles from a graggle.
Since you can never actually delete edges from a graggle, cycles are resolved by deleting nodes. Specifically, we divide a graggle into its strongly connected components. From each strongly connected component, you must select exactly one node to survive.
Methods
impl<'a> CycleResolver<'a>
[src]
pub fn new(graggle: Graggle<'a>) -> CycleResolver<'a>
[src]
Creates a new resolver for eliminating cycles in the given graggle.
pub fn next_component(&self) -> Option<&HashSet<NodeId>>
[src]
If there are any strongly connected components remaining, returns the next one that needs to be resolved.
pub fn resolve_component(&mut self, rep: NodeId)
[src]
Resolves the current strongly connected component by deleting all nodes in it except for
rep
.
Panics
Panics unless rep
is an element of the current component (as returned by
next_component
).
pub fn into_order_resolver(self) -> OrderResolver<'a>
[src]
Assuming that all cycles have already been taken care of, moves to the next stage of resolution.
Auto Trait Implementations
impl<'a> Send for CycleResolver<'a>
impl<'a> Sync for CycleResolver<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self