pub struct WaveletMatrix<T, const BIT_SIZE: usize> { /* private fields */ }
Expand description
Wavelet matrix
Implementations§
Source§impl<T, const BIT_SIZE: usize> WaveletMatrix<T, BIT_SIZE>
impl<T, const BIT_SIZE: usize> WaveletMatrix<T, BIT_SIZE>
Sourcepub fn new(data: Vec<T>) -> Self
pub fn new(data: Vec<T>) -> Self
T
の列からWaveletMatrix
を作る。
Sourcepub fn count(&self, range: impl RangeBounds<usize>, value: T) -> usize
pub fn count(&self, range: impl RangeBounds<usize>, value: T) -> usize
range
に含まれるvalue
の個数。
Sourcepub fn quantile(&self, range: impl RangeBounds<usize>, nth: usize) -> Option<T>
pub fn quantile(&self, range: impl RangeBounds<usize>, nth: usize) -> Option<T>
range
でnth
(0-indexed)番目に小さい値。
Sourcepub fn maximum(&self, range: impl RangeBounds<usize>) -> Option<T>
pub fn maximum(&self, range: impl RangeBounds<usize>) -> Option<T>
range
での最大値
Sourcepub fn minimum(&self, range: impl RangeBounds<usize>) -> Option<T>
pub fn minimum(&self, range: impl RangeBounds<usize>) -> Option<T>
range
での最小値
Sourcepub fn next_value(
&self,
range: impl RangeBounds<usize> + Clone,
lb: T,
) -> Option<T>
pub fn next_value( &self, range: impl RangeBounds<usize> + Clone, lb: T, ) -> Option<T>
range
でlb
以上の最小値
Sourcepub fn prev_value(
&self,
range: impl RangeBounds<usize> + Clone,
ub: T,
) -> Option<T>
pub fn prev_value( &self, range: impl RangeBounds<usize> + Clone, ub: T, ) -> Option<T>
range
でub
未満の最大値
Sourcepub fn range_freq(
&self,
range: impl RangeBounds<usize> + Clone,
lb: T,
ub: T,
) -> usize
pub fn range_freq( &self, range: impl RangeBounds<usize> + Clone, lb: T, ub: T, ) -> usize
range
でlb
以上ub
未満の値の個数
Trait Implementations§
Source§impl<T: Clone, const BIT_SIZE: usize> Clone for WaveletMatrix<T, BIT_SIZE>
impl<T: Clone, const BIT_SIZE: usize> Clone for WaveletMatrix<T, BIT_SIZE>
Source§fn clone(&self) -> WaveletMatrix<T, BIT_SIZE>
fn clone(&self) -> WaveletMatrix<T, BIT_SIZE>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T, const BIT_SIZE: usize> Freeze for WaveletMatrix<T, BIT_SIZE>
impl<T, const BIT_SIZE: usize> RefUnwindSafe for WaveletMatrix<T, BIT_SIZE>where
T: RefUnwindSafe,
impl<T, const BIT_SIZE: usize> Send for WaveletMatrix<T, BIT_SIZE>where
T: Send,
impl<T, const BIT_SIZE: usize> Sync for WaveletMatrix<T, BIT_SIZE>where
T: Sync,
impl<T, const BIT_SIZE: usize> Unpin for WaveletMatrix<T, BIT_SIZE>where
T: Unpin,
impl<T, const BIT_SIZE: usize> UnwindSafe for WaveletMatrix<T, BIT_SIZE>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more