Struct idx_binary::Avltriee
pub struct Avltriee<T, A = DefaultAvltrieeAllocator<T>> { /* private fields */ }Implementations§
§impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
pub fn rows_count(&self) -> u32
pub fn rows_count(&self) -> u32
Return count of rows.
§impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
pub fn iter(&self) -> AvltrieeIter<'_, T, A> ⓘ
pub fn iter(&self) -> AvltrieeIter<'_, T, A> ⓘ
Generate an iterator.
pub fn desc_iter(&self) -> AvltrieeIter<'_, T, A> ⓘ
pub fn desc_iter(&self) -> AvltrieeIter<'_, T, A> ⓘ
Generate an iterator. Iterates in descending order.
pub fn iter_by<F, 'a>(&'a self, cmp: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_by<F, 'a>(&'a self, cmp: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with the same value as the specified value.
pub fn iter_from<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_from<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator with values starting from the specified value.
pub fn desc_iter_from<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn desc_iter_from<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator with values starting from the specified value. Iterates in descending order.
pub fn iter_over<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_over<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values greater than the specified value.
pub fn desc_iter_over<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn desc_iter_over<F, 'a>(&'a self, search: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values greater than the specified value. Iterates in descending order.
pub fn iter_to<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_to<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values less than or equal to the specified value.
pub fn desc_iter_to<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn desc_iter_to<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values less than or equal to the specified value. Iterates in descending order.
pub fn iter_under<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_under<F, 'a>(&'a self, search_from: F) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values less than the specified value.
pub fn desc_iter_under<F, 'a>(
&'a self,
search_from: F
) -> AvltrieeIter<'a, T, A> ⓘ
pub fn desc_iter_under<F, 'a>( &'a self, search_from: F ) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with values less than the specified value. Iterates in descending order.
pub fn iter_range<S, E, 'a>(
&'a self,
start: S,
end: E
) -> AvltrieeIter<'a, T, A> ⓘ
pub fn iter_range<S, E, 'a>( &'a self, start: S, end: E ) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with the specified range of values.
pub fn desc_iter_range<S, E, 'a>(
&'a self,
start: S,
end: E
) -> AvltrieeIter<'a, T, A> ⓘ
pub fn desc_iter_range<S, E, 'a>( &'a self, start: S, end: E ) -> AvltrieeIter<'a, T, A> ⓘ
Generates an iterator of nodes with the specified range of values. Iterates in descending order.
§impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
pub fn update(&mut self, row: NonZero<u32>, value: T)
pub fn update(&mut self, row: NonZero<u32>, value: T)
Updates the value in the specified row. If you specify a row that does not exist, space will be automatically allocated. If you specify a row that is too large, memory may be allocated unnecessarily.
pub fn update_with_holder<I>(
holder: &mut impl AvltrieeHolder<T, I, A>,
row: NonZero<u32>,
input: I
)
pub fn update_with_holder<I>( holder: &mut impl AvltrieeHolder<T, I, A>, row: NonZero<u32>, input: I )
Updates the value of the specified row via trait AvltrieeHolder. If you specify a row that does not exist, space will be automatically allocated. If you specify a row that is too large, memory may be allocated unnecessarily.
pub unsafe fn insert_unique_unchecked(
&mut self,
row: NonZero<u32>,
value: T,
found: Found
)
pub unsafe fn insert_unique_unchecked( &mut self, row: NonZero<u32>, value: T, found: Found )
Insert a unique value. If you specify a row that does not exist, space will be automatically allocated. If you specify a row that is too large, memory may be allocated unnecessarily.
§Safety
value must be unique.
§impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
impl<T, A> Avltriee<T, A>where
A: AvltrieeAllocator<T>,
pub fn with_allocator(allocator: A) -> Avltriee<T, A>
pub fn with_allocator(allocator: A) -> Avltriee<T, A>
Creates the Avltriee with [AvltrieeAllocator].
pub fn get(&self, row: NonZero<u32>) -> Option<&AvltrieeNode<T>>
pub fn get(&self, row: NonZero<u32>) -> Option<&AvltrieeNode<T>>
Returns the node of the specified row.