[][src]Struct handlegraph::hashgraph::HashGraph

pub struct HashGraph {
    pub max_id: NodeId,
    pub min_id: NodeId,
    pub graph: FnvHashMap<NodeId, Node>,
    pub path_id: FnvHashMap<Vec<u8>, PathId>,
    pub paths: FnvHashMap<PathId, Path>,
}

A handlegraph implementation using HashMap to represent the graph topology and nodes, and each path as a Vec of nodes.

Fields

max_id: NodeIdmin_id: NodeIdgraph: FnvHashMap<NodeId, Node>path_id: FnvHashMap<Vec<u8>, PathId>paths: FnvHashMap<PathId, Path>

Implementations

impl HashGraph[src]

pub fn new() -> HashGraph[src]

pub fn from_gfa<T: OptFields>(gfa: &GFA<usize, T>) -> HashGraph[src]

pub fn print_path(&self, path_id: &PathId)[src]

pub fn print_occurrences(&self)[src]

pub fn get_node(&self, node_id: &NodeId) -> Option<&Node>[src]

pub fn get_node_unchecked(&self, node_id: &NodeId) -> &Node[src]

pub fn get_node_mut(&mut self, node_id: &NodeId) -> Option<&mut Node>[src]

pub fn get_path(&self, path_id: &PathId) -> Option<&Path>[src]

pub fn get_path_unchecked(&self, path_id: &PathId) -> &Path[src]

Trait Implementations

impl AdditiveHandleGraph for HashGraph[src]

impl Debug for HashGraph[src]

impl Default for HashGraph[src]

impl<'a> GraphPathNames for &'a HashGraph[src]

type PathName = Copied<Iter<'a, u8>>

The iterator on the name of a path.

impl GraphPaths for HashGraph[src]

type StepIx = StepIx

impl<'a> GraphPathsRef for &'a HashGraph[src]

type PathRef = &'a Path

impl HandleGraph for HashGraph[src]

impl<'a> IntoEdges for &'a HashGraph[src]

type Edges = EdgesIter<&'a HashGraph>

The iterator through all the edges in the graph.

impl<'a> IntoHandles for &'a HashGraph[src]

type Handles = NodeIdRefHandles<'a, Keys<'a, NodeId, Node>>

The iterator through all of the graph's handles.

impl<'a> IntoHandlesPar for &'a HashGraph[src]

type HandlesPar = IterBridge<NodeIdRefHandles<'a, Keys<'a, NodeId, Node>>>

The Rayon ParallelIterator through all the handles in the graph.

impl<'a> IntoNeighbors for &'a HashGraph[src]

type Neighbors = NeighborIter<'a, Iter<'a, Handle>>

impl<'a> IntoNodeOccurrences for &'a HashGraph[src]

type Occurrences = OccurIter<'a>

An iterator through the steps on a path, by PathId and StepIx.

impl<'a> IntoPathIds for &'a HashGraph[src]

type PathIds = Copied<Keys<'a, PathId, Path>>

impl<'a> IntoSequences for &'a HashGraph[src]

type Sequence = SequenceIter<Copied<Iter<'a, u8>>>

impl MutableGraphPaths for HashGraph[src]

impl MutableHandles for HashGraph[src]

impl PathSequences for HashGraph[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> Pointable for T

type Init = T

The type for initializers.

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.