Struct light_phylogeny::ArenaTree[][src]

pub struct ArenaTree<T> where
    T: PartialEq
{ pub arena: Vec<Noeud<T>>, }

Fields

arena: Vec<Noeud<T>>

Implementations

impl<T> ArenaTree<T> where
    T: PartialEq
[src]

pub fn node(&mut self, val: T) -> usize[src]

Add a node and send its new index. If the node already exists, send its index.

pub fn new_node(&mut self, val: T) -> usize[src]

Add a node and send its new index. If the node already exists, send a panic alert.

pub fn get_index(&mut self, name: String) -> Result<usize, usize>[src]

Get index of a node from its name

pub fn get_root(&mut self) -> usize[src]

Get the index of the root.

pub fn is_leaf(&self, idx: usize) -> bool[src]

Check if the node is a leaf.

pub fn is_left(&self, idx: usize) -> bool[src]

Check if the node is a left node.

pub fn is_root(&self, idx: usize) -> bool[src]

Check if the node is the root.

pub fn depth(&self, idx: usize) -> usize[src]

Get the depth of the node in the tree.

pub fn get_largest_x(&mut self) -> f32[src]

Get the largest x value of a tree.

pub fn get_largest_y(&mut self) -> f32[src]

Get the largest y value of a tree.

pub fn get_smallest_x(&mut self) -> f32[src]

Get the smallest x value of a tree.

pub fn get_smallest_y(&mut self) -> f32[src]

Get the smallest y value of a tree.

Trait Implementations

impl<T: Debug> Debug for ArenaTree<T> where
    T: PartialEq
[src]

impl<T: Default> Default for ArenaTree<T> where
    T: PartialEq
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ArenaTree<T> where
    T: RefUnwindSafe

impl<T> Send for ArenaTree<T> where
    T: Send

impl<T> Sync for ArenaTree<T> where
    T: Sync

impl<T> Unpin for ArenaTree<T> where
    T: Unpin

impl<T> UnwindSafe for ArenaTree<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,