[][src]Struct algorithms_edu::graph::UnweightedAdjacencyList

pub struct UnweightedAdjacencyList { /* fields omitted */ }

Implementations

impl UnweightedAdjacencyList[src]

impl UnweightedAdjacencyList[src]

pub fn with_size(n: usize) -> Self[src]

Initialize an empty adjacency list that can hold up to n nodes.

pub fn len(&self) -> usize[src]

Number of nodes

pub fn is_empty(&self) -> bool[src]

pub fn add_directed_edge(&mut self, u: usize, v: usize)[src]

Add a directed edge from node u to node v

pub fn add_undirected_edge(&mut self, u: usize, v: usize)[src]

Add an undirected edge between nodes u and v.

Trait Implementations

impl Index<usize> for UnweightedAdjacencyList[src]

type Output = Vec<usize>

The returned type after indexing.

impl TreeCenter for UnweightedAdjacencyList[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.