[][src]Trait dinotree::advanced::Splitter

pub trait Splitter: Sized {
    fn div(&mut self) -> Self;
fn add(&mut self, b: Self);
fn node_start(&mut self);
fn node_end(&mut self); }

A trait that gives the user callbacks at events in a recursive algorithm on the tree. The main motivation behind this trait was to track the time spent taken at each level of the tree during construction.

Required methods

fn div(&mut self) -> Self

Called to split this into two to be passed to the children.

fn add(&mut self, b: Self)

Called to add the results of the recursive calls on the children.

fn node_start(&mut self)

Called at the start of the recursive call.

fn node_end(&mut self)

It is important to note that this gets called in other places besides in the final recursive call of a leaf. They may get called in a non leaf if its found that there is no more need to recurse further.

Loading content...

Implementors

impl Splitter for LevelTimer
[src]

impl Splitter for SplitterEmpty
[src]

Loading content...