[][src]Struct libjp::resolver::CycleResolver

pub struct CycleResolver<'a> { /* fields omitted */ }

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]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self