Struct compt::bfs_order::CompleteTreeContainer
source · pub struct CompleteTreeContainer<T> { /* private fields */ }
Expand description
Contains of a Complete tree. Internally uses a Vec.
Implementations§
source§impl<T> CompleteTreeContainer<T>
impl<T> CompleteTreeContainer<T>
pub fn from_vec(
vec: Vec<T>
) -> Result<CompleteTreeContainer<T>, NotCompleteTreeSizeErr>
sourcepub fn into_nodes(self) -> Vec<T>
pub fn into_nodes(self) -> Vec<T>
Returns the underlying elements as they are, in BFS order.
Methods from Deref<Target = CompleteTree<T>>§
pub fn get_height(&self) -> usize
pub fn get_nodes_mut(&mut self) -> &mut [T] ⓘ
Trait Implementations§
source§impl<T> Deref for CompleteTreeContainer<T>
impl<T> Deref for CompleteTreeContainer<T>
§type Target = CompleteTree<T>
type Target = CompleteTree<T>
The resulting type after dereferencing.
source§fn deref(&self) -> &CompleteTree<T>
fn deref(&self) -> &CompleteTree<T>
Dereferences the value.
source§impl<T> DerefMut for CompleteTreeContainer<T>
impl<T> DerefMut for CompleteTreeContainer<T>
source§fn deref_mut(&mut self) -> &mut CompleteTree<T>
fn deref_mut(&mut self) -> &mut CompleteTree<T>
Mutably dereferences the value.