[][src]Struct Project2::avl_tree::AVLTree

pub struct AVLTree<T> {
    pub root: Pointer,
    // some fields omitted
}

Fields

root: Pointer

Methods

impl<T: PartialOrd + Copy + Debug> AVLTree<T>[src]

pub fn new() -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn get_height(&self) -> u32[src]

pub fn get_balance_factor(&self, node: Pointer) -> i32[src]

pub fn get_height_from_node(&self, node: Pointer) -> u32[src]

pub fn insert(&mut self, val: T)[src]

pub fn insert_below_node(&mut self, val: T, node: Pointer)[src]

pub fn left_rotate(&mut self, current: Pointer)[src]

pub fn right_rotate(&mut self, current: Pointer)[src]

pub fn rebalance(&mut self, node: Pointer)[src]

pub fn get_node(&self, val: T) -> Pointer[src]

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

pub fn delete(&mut self, val: T)[src]

pub fn count_leaf_nodes(&self) -> u32[src]

pub fn count_leaf_nodes_from_node(&self, node: Pointer) -> u32[src]

pub fn print_in_order_traversal(&self)[src]

pub fn min_of_right(&self, head: Pointer) -> Pointer[src]

Trait Implementations

impl<T: Debug + Copy> Debug for AVLTree<T>[src]

impl<T> Index<Pointer> for AVLTree<T>[src]

type Output = Node<T>

The returned type after indexing.

impl<T> IndexMut<Pointer> for AVLTree<T>[src]

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for AVLTree<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.