[][src]Trait handlegraph::pathhandlegraph::embedded_paths::GraphPaths

pub trait GraphPaths: Sized {
    type StepIx: Sized + Copy + Eq;
    fn path_count(&self) -> usize;
fn path_len(&self, id: PathId) -> Option<usize>;
fn path_circular(&self, id: PathId) -> Option<bool>;
fn path_handle_at_step(
        &self,
        id: PathId,
        index: Self::StepIx
    ) -> Option<Handle>;
fn path_first_step(&self, id: PathId) -> Option<Self::StepIx>;
fn path_last_step(&self, id: PathId) -> Option<Self::StepIx>;
fn path_next_step(
        &self,
        id: PathId,
        index: Self::StepIx
    ) -> Option<Self::StepIx>;
fn path_prev_step(
        &self,
        id: PathId,
        index: Self::StepIx
    ) -> Option<Self::StepIx>; }

A handlegraph with embedded paths. The step for any given path is indexed by the associated type StepIx.

Provides methods for basic querying of the graph's paths, and steps on a path. For a more ergonomic way of iterating through the steps of a path, see the traits GraphPathsRef, and PathSteps.

Associated Types

Loading content...

Required methods

fn path_count(&self) -> usize[src]

Return the number of paths in this graph.

fn path_len(&self, id: PathId) -> Option<usize>[src]

Return the number of steps of the path id, if it exists.

fn path_circular(&self, id: PathId) -> Option<bool>[src]

Return the circularity of the path id, if it exists.

fn path_handle_at_step(&self, id: PathId, index: Self::StepIx) -> Option<Handle>[src]

Find the handle at step index in path id, if both the path exists, and the step in the path.

fn path_first_step(&self, id: PathId) -> Option<Self::StepIx>[src]

Return the index to the first step of path id, if the path exists and is not empty.

The resulting StepIx should point to the first step of the path's Steps iterator.

fn path_last_step(&self, id: PathId) -> Option<Self::StepIx>[src]

Return the index to the last step of path id, if the path exists and is not empty.

The resulting StepIx should point to the last step of the path's Steps iterator.

fn path_next_step(
    &self,
    id: PathId,
    index: Self::StepIx
) -> Option<Self::StepIx>
[src]

Return the index to the step after index on path id, if the path exists and index both exists on the path, and is not the last step of the path.

The resulting StepIx should point to the same step as would calling next on the path's corresponding Steps iterator, if index was the last produced step.

fn path_prev_step(
    &self,
    id: PathId,
    index: Self::StepIx
) -> Option<Self::StepIx>
[src]

Return the index to the step before index on path id, if the path exists and index both exists on the path, and is not the first step of the path.

The resulting StepIx should point to the same step as would calling next_back on the path's corresponding Steps iterator, if index was the last produced step.

Loading content...

Implementations on Foreign Types

impl<'a, T> GraphPaths for &'a T where
    T: GraphPaths
[src]

type StepIx = T::StepIx

impl<'a, T> GraphPaths for &'a mut T where
    T: GraphPaths
[src]

type StepIx = T::StepIx

Loading content...

Implementors

impl GraphPaths for HashGraph[src]

type StepIx = StepIx

impl GraphPaths for PackedGraph[src]

type StepIx = StepPtr

Loading content...