[][src]Trait neurarbor::TopoArbor

pub trait TopoArbor {
    type Node;
    fn prune_at(&mut self, node_ids: &[NodeId]) -> HashSet<NodeId>;
fn prune_branches_containing(
        &mut self,
        node_ids: &[NodeId]
    ) -> HashSet<NodeId>;
fn prune_below_strahler(&mut self, threshold: usize) -> HashSet<NodeId>;
fn prune_beyond_branches(&mut self, threshold: usize) -> HashSet<NodeId>;
fn prune_beyond_steps(&mut self, threshold: usize) -> HashSet<NodeId>;
fn slabs(&self) -> Vec<Vec<NodeId>>; }

Trait adding some topological utilities to a tree representation.

Associated Types

type Node

Loading content...

Required methods

fn prune_at(&mut self, node_ids: &[NodeId]) -> HashSet<NodeId>

Remove the given nodes and everything below them. Some nodes in the starting set may have been removed as descendants of others.

fn prune_branches_containing(&mut self, node_ids: &[NodeId]) -> HashSet<NodeId>

Remove everything distal to the given node, and up to the next branch proximal of it.

fn prune_below_strahler(&mut self, threshold: usize) -> HashSet<NodeId>

Remove all branches with a strahler index less than threshold.

fn prune_beyond_branches(&mut self, threshold: usize) -> HashSet<NodeId>

Remove all branches greater than threshold branch points from the root.

fn prune_beyond_steps(&mut self, threshold: usize) -> HashSet<NodeId>

Remove all nodes greater than threshold steps from the root.

fn slabs(&self) -> Vec<Vec<NodeId>>

Decompose the arbor into slabs: unbranched runs of nodes. The start of every slab is the root or a branch point, and the end of every slab is a branch point or leaf. Returned depth first in preorder.

Loading content...

Implementations on Foreign Types

impl<T: Debug> TopoArbor for Tree<T>[src]

type Node = T

Loading content...

Implementors

Loading content...