[][src]Struct umgap::tree::lca::LCACalculator

pub struct LCACalculator {
    pub root: TaxonId,
    pub parents: Vec<Option<TaxonId>>,
}

Struct capable of calculating the LCA of 2 nodes in a TaxonTree.

Fields

root: TaxonId

The root of the taxon tree.

parents: Vec<Option<TaxonId>>

Contains the ancestor for each node. Nodes are indexed by their id.

Methods

impl LCACalculator[src]

pub fn new(root: TaxonId, taxonomy: &TaxonList) -> Self[src]

Constructs an LCACalculator for a given taxon tree.

Arguments:

  • root - the root of the taxon tree.
  • taxonomy - the taxons, indexed by their id.

Trait Implementations

impl Aggregator for LCACalculator[src]

fn counting_aggregate(&self, taxons: &Vec<TaxonId>) -> Result<TaxonId>[src]

Aggregates a list of taxons into a resulting taxon id.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]