Struct LowLink

Source
pub struct LowLink<'a> {
    pub low: Vec<usize>,
    pub ord: Vec<usize>,
    pub articulation: Vec<usize>,
    pub bridge: Vec<(usize, usize)>,
    /* private fields */
}

Fields§

§low: Vec<usize>§ord: Vec<usize>§articulation: Vec<usize>§bridge: Vec<(usize, usize)>

Implementations§

Source§

impl<'a> LowLink<'a>

Source

pub fn new(graph: &'a UndirectedSparseGraph) -> Self

Examples found in repository?
crates/aizu_online_judge/src/grl/grl_3_b.rs (line 10)
6pub fn grl_3_b(reader: impl Read, mut writer: impl Write) {
7    let s = read_all_unchecked(reader);
8    let mut scanner = Scanner::new(&s);
9    scan!(scanner, vs, es, (graph, _): @UndirectedGraphScanner::<usize, ()>::new(vs, es));
10    let mut bridge = LowLink::new(&graph).bridge;
11    bridge.sort_unstable();
12    for (u, v) in bridge.into_iter() {
13        writeln!(writer, "{} {}", u, v).ok();
14    }
15}
More examples
Hide additional examples
crates/aizu_online_judge/src/grl/grl_3_a.rs (line 10)
6pub fn grl_3_a(reader: impl Read, mut writer: impl Write) {
7    let s = read_all_unchecked(reader);
8    let mut scanner = Scanner::new(&s);
9    scan!(scanner, vs, es, (graph, _): @UndirectedGraphScanner::<usize, ()>::new(vs, es));
10    let mut articulation = LowLink::new(&graph).articulation;
11    articulation.sort_unstable();
12    for u in articulation.into_iter() {
13        writeln!(writer, "{}", u).ok();
14    }
15}

Auto Trait Implementations§

§

impl<'a> Freeze for LowLink<'a>

§

impl<'a> RefUnwindSafe for LowLink<'a>

§

impl<'a> Send for LowLink<'a>

§

impl<'a> Sync for LowLink<'a>

§

impl<'a> Unpin for LowLink<'a>

§

impl<'a> UnwindSafe for LowLink<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.