pub struct PlcpConstruction<'p, 's, 't, I: InputElement, O: OutputElement, SaB: BufferMode, PlcpB: BufferMode, P: ParallelismOrUndecided> { /* private fields */ }
Expand description
Construct the permuted longest common prefix array for a suffix array and text.
See plcp
for details.
Implementations§
Source§impl<'p, 's, 't, I: InputElement, O: OutputElement, SaB: BufferMode, PlcpB: BufferMode> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, Undecided>
impl<'p, 's, 't, I: InputElement, O: OutputElement, SaB: BufferMode, PlcpB: BufferMode> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, Undecided>
pub fn single_threaded( self, ) -> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, SingleThreaded>
pub fn multi_threaded( self, thread_count: ThreadCount, ) -> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, MultiThreaded>
Source§impl<'s, 't, I: InputElement, O: OutputElement, SaB: BufferMode, P: ParallelismOrUndecided> PlcpConstruction<'static, 's, 't, I, O, SaB, OwnedBuffer, P>
impl<'s, 't, I: InputElement, O: OutputElement, SaB: BufferMode, P: ParallelismOrUndecided> PlcpConstruction<'static, 's, 't, I, O, SaB, OwnedBuffer, P>
Sourcepub fn in_borrowed_buffer<'p>(
self,
plcp_buffer: &'p mut [O],
) -> PlcpConstruction<'p, 's, 't, I, O, SaB, BorrowedBuffer, P>
pub fn in_borrowed_buffer<'p>( self, plcp_buffer: &'p mut [O], ) -> PlcpConstruction<'p, 's, 't, I, O, SaB, BorrowedBuffer, P>
Construct the PLCP array in a borrowed buffer instead of allocating an owned Vec
.
The buffer must have the same length as the suffix array and text.
Source§impl<'p, 's, 't, I: InputElement, O: OutputElement, SaB: BufferMode, PlcpB: BufferMode, P: Parallelism> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I: InputElement, O: OutputElement, SaB: BufferMode, PlcpB: BufferMode, P: Parallelism> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
Sourcepub fn run(
self,
) -> Result<SuffixArrayWithPlcp<'p, 's, O, SaB, PlcpB>, LibsaisError>
pub fn run( self, ) -> Result<SuffixArrayWithPlcp<'p, 's, O, SaB, PlcpB>, LibsaisError>
Construct the PLCP array for the given suffix array and text.
§Panics
If the text, suffix array and PLCP buffers don’t all have the same length, which has to fit into the output type. When using a generalized suffix array, the last character of the text has to be the zero byte (not ASCII ‘0’).
§Returns
An error or a type that bundles the suffix array with the PLCP array.
Trait Implementations§
Source§impl<'p, 's, 't, I: Debug + InputElement, O: Debug + OutputElement, SaB: Debug + BufferMode, PlcpB: Debug + BufferMode, P: Debug + ParallelismOrUndecided> Debug for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I: Debug + InputElement, O: Debug + OutputElement, SaB: Debug + BufferMode, PlcpB: Debug + BufferMode, P: Debug + ParallelismOrUndecided> Debug for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
Auto Trait Implementations§
impl<'p, 's, 't, I, O, SaB, PlcpB, P> Freeze for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I, O, SaB, PlcpB, P> RefUnwindSafe for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>where
P: RefUnwindSafe,
PlcpB: RefUnwindSafe,
I: RefUnwindSafe,
SaB: RefUnwindSafe,
O: RefUnwindSafe,
impl<'p, 's, 't, I, O, SaB, PlcpB, P> Send for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I, O, SaB, PlcpB, P> Sync for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I, O, SaB, PlcpB, P> Unpin for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
impl<'p, 's, 't, I, O, SaB, PlcpB, P> !UnwindSafe for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more