[−][src]Struct handlegraph::hashgraph::HashGraph
A handlegraph implementation using HashMap
to represent the
graph topology and nodes, and each path as a Vec
of nodes.
Fields
max_id: NodeId
min_id: NodeId
graph: 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]
fn append_handle(&mut self, sequence: &[u8]) -> Handle
[src]
fn create_handle<T: Into<NodeId>>(&mut self, seq: &[u8], node_id: T) -> Handle
[src]
fn create_edge(&mut self, Edge(left, right): Edge)
[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.
fn get_path_id(self, name: &[u8]) -> Option<PathId>
[src]
fn get_path_name(self, id: PathId) -> Option<Self::PathName>
[src]
fn get_path_name_vec(self, id: PathId) -> Option<Vec<u8>>
[src]
fn has_path(self, name: &[u8]) -> bool
[src]
impl GraphPaths for HashGraph
[src]
type StepIx = StepIx
fn path_count(&self) -> usize
[src]
fn path_len(&self, id: PathId) -> Option<usize>
[src]
fn path_circular(&self, id: PathId) -> Option<bool>
[src]
fn path_handle_at_step(&self, id: PathId, index: Self::StepIx) -> Option<Handle>
[src]
fn path_first_step(&self, id: PathId) -> Option<Self::StepIx>
[src]
fn path_last_step(&self, id: PathId) -> Option<Self::StepIx>
[src]
fn path_next_step(&self, id: PathId, step: Self::StepIx) -> Option<Self::StepIx>
[src]
fn path_prev_step(&self, id: PathId, step: Self::StepIx) -> Option<Self::StepIx>
[src]
impl<'a> GraphPathsRef for &'a HashGraph
[src]
impl HandleGraph for HashGraph
[src]
fn min_node_id(&self) -> NodeId
[src]
fn max_node_id(&self) -> NodeId
[src]
fn node_count(&self) -> usize
[src]
fn edge_count(&self) -> usize
[src]
fn total_length(&self) -> usize
[src]
impl<'a> IntoEdges for &'a HashGraph
[src]
type Edges = EdgesIter<&'a HashGraph>
The iterator through all the edges in the graph.
fn edges(self) -> Self::Edges
[src]
impl<'a> IntoHandles for &'a HashGraph
[src]
type Handles = NodeIdRefHandles<'a, Keys<'a, NodeId, Node>>
The iterator through all of the graph's handles.
fn handles(self) -> Self::Handles
[src]
fn has_node<I: Into<NodeId>>(self, n_id: I) -> bool
[src]
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.
fn handles_par(self) -> Self::HandlesPar
[src]
impl<'a> IntoNeighbors for &'a HashGraph
[src]
type Neighbors = NeighborIter<'a, Iter<'a, Handle>>
fn neighbors(self, handle: Handle, dir: Direction) -> Self::Neighbors
[src]
fn degree(self, handle: Handle, dir: Direction) -> usize
[src]
fn has_edge(self, left: Handle, right: Handle) -> bool
[src]
impl<'a> IntoNodeOccurrences for &'a HashGraph
[src]
type Occurrences = OccurIter<'a>
An iterator through the steps on a path, by PathId
and StepIx
.
fn steps_on_handle(self, handle: Handle) -> Option<Self::Occurrences>
[src]
impl<'a> IntoPathIds for &'a HashGraph
[src]
impl<'a> IntoSequences for &'a HashGraph
[src]
type Sequence = SequenceIter<Copied<Iter<'a, u8>>>
fn sequence(self, handle: Handle) -> Self::Sequence
[src]
fn sequence_vec(self, handle: Handle) -> Vec<u8>
[src]
fn node_len(self, handle: Handle) -> usize
[src]
fn subsequence(self, handle: Handle, start: usize, len: usize) -> Vec<u8>
[src]
fn base(self, handle: Handle, index: usize) -> Option<u8>
[src]
impl MutableGraphPaths for HashGraph
[src]
fn create_path(&mut self, name: &[u8], circular: bool) -> Option<PathId>
[src]
fn destroy_path(&mut self, id: PathId) -> bool
[src]
fn path_append_step(
&mut self,
id: PathId,
handle: Handle
) -> Option<Self::StepIx>
[src]
&mut self,
id: PathId,
handle: Handle
) -> Option<Self::StepIx>
fn path_prepend_step(
&mut self,
id: PathId,
handle: Handle
) -> Option<Self::StepIx>
[src]
&mut self,
id: PathId,
handle: Handle
) -> Option<Self::StepIx>
fn path_insert_step_after(
&mut self,
id: PathId,
index: Self::StepIx,
handle: Handle
) -> Option<Self::StepIx>
[src]
&mut self,
id: PathId,
index: Self::StepIx,
handle: Handle
) -> Option<Self::StepIx>
fn path_remove_step(
&mut self,
id: PathId,
index: Self::StepIx
) -> Option<Self::StepIx>
[src]
&mut self,
id: PathId,
index: Self::StepIx
) -> Option<Self::StepIx>
fn path_flip_step(
&mut self,
id: PathId,
index: Self::StepIx
) -> Option<Self::StepIx>
[src]
&mut self,
id: PathId,
index: Self::StepIx
) -> Option<Self::StepIx>
fn path_rewrite_segment(
&mut self,
id: PathId,
from: Self::StepIx,
to: Self::StepIx,
new_segment: &[Handle]
) -> Option<(Self::StepIx, Self::StepIx)>
[src]
&mut self,
id: PathId,
from: Self::StepIx,
to: Self::StepIx,
new_segment: &[Handle]
) -> Option<(Self::StepIx, Self::StepIx)>
fn path_set_circularity(&mut self, id: PathId, circular: bool) -> Option<()>
[src]
impl MutableHandles for HashGraph
[src]
fn divide_handle(&mut self, handle: Handle, offsets: &[usize]) -> Vec<Handle>
[src]
fn apply_orientation(&mut self, handle: Handle) -> Handle
[src]
fn split_handle(&mut self, handle: Handle, offset: usize) -> (Handle, Handle)
[src]
impl PathSequences for HashGraph
[src]
Auto Trait Implementations
impl RefUnwindSafe for HashGraph
[src]
impl Send for HashGraph
[src]
impl Sync for HashGraph
[src]
impl Unpin for HashGraph
[src]
impl UnwindSafe for HashGraph
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,