[][src]Struct three_edge_connected::graph::Graph

pub struct Graph<N> {
    pub graph: FxMapGraph,
    pub inv_names: Vec<N>,
}

An adjacency list representation of a generic graph, including the map required to go from node index to the original node name. The N type parameter is the node name in the original graph, e.g. BString for GFA graphs, or usize for graphs that use integer names.

Fields

graph: FxMapGraphinv_names: Vec<N>

Implementations

impl Graph<usize>[src]

pub fn from_edges<I>(input: I) -> Graph<usize> where
    I: Iterator<Item = (usize, usize)>, 
[src]

Construct an adjacency graph from an iterator over the edges of an existing graph. Both the input and output have usize node IDs, but from_edges performs a transformation to ensure all the node IDs are consecutive starting from 0.

impl Graph<Vec<u8>>[src]

pub fn from_gfa_reader<T: BufRead>(reader: &mut T) -> Graph<Vec<u8>>[src]

Constructs an adjacency list representation of the given GFA file input stream, parsing the GFA line-by-line and only keeping the links. Returns the graph as an adjacency list and a map from graph indices to GFA segment names.

impl<N: Clone> Graph<N>[src]

pub fn invert_components(&self, components: Vec<Vec<usize>>) -> Vec<Vec<N>>[src]

Given a vector of graph components (as produced by

Auto Trait Implementations

impl<N> RefUnwindSafe for Graph<N> where
    N: RefUnwindSafe

impl<N> Send for Graph<N> where
    N: Send

impl<N> Sync for Graph<N> where
    N: Sync

impl<N> Unpin for Graph<N> where
    N: Unpin

impl<N> UnwindSafe for Graph<N> where
    N: UnwindSafe

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.