[][src]Struct flag_algebra::flags::Graph

pub struct Graph { /* fields omitted */ }

An undirected graph.

Implementations

impl Graph[src]

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

Return the number of vertices in the graph

pub fn nbrs(&self, v: usize) -> Vec<usize>[src]

Return the vector of vertices adjacent to v.

pub fn new(n: usize, edge: &[(usize, usize)]) -> Self[src]

Create a graph on n vertices with edge set edge. The vertices of this graph are 0,...,n-1.

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

Create the graph on n vertices with no edge.

pub fn edge(&self, u: usize, v: usize) -> bool[src]

Returns true id uv is an edge.

pub fn edges(&self) -> EdgeIterator<'_>

Notable traits for EdgeIterator<'a>

impl<'a> Iterator for EdgeIterator<'a> type Item = (usize, usize);
[src]

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

Returns true if the graph is connected.

impl Graph[src]

pub fn petersen() -> Self[src]

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

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

Trait Implementations

impl Canonize for Graph[src]

impl Clone for Graph[src]

impl Debug for Graph[src]

impl<'de> Deserialize<'de> for Graph[src]

impl Display for Graph[src]

impl Draw for Graph[src]

impl Eq for Graph[src]

impl Flag for Graph[src]

impl Ord for Graph[src]

impl PartialEq<Graph> for Graph[src]

impl PartialOrd<Graph> for Graph[src]

impl Serialize for Graph[src]

impl StructuralEq for Graph[src]

impl StructuralPartialEq for Graph[src]

impl SubFlag<Graph> for Connected[src]

Auto Trait Implementations

impl RefUnwindSafe for Graph

impl Send for Graph

impl Sync for Graph

impl Unpin for Graph

impl UnwindSafe for Graph

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<F> Html for F where
    F: Draw
[src]

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

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,