PlcpConstruction

Struct PlcpConstruction 

Source
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>

Source

pub fn single_threaded( self, ) -> PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, SingleThreaded>

Source

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>

Source

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>

Source

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>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>

§

impl<'p, 's, 't, I, O, SaB, PlcpB, P> Send for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
where P: Send, PlcpB: Send, I: Sync, SaB: Send, O: Send,

§

impl<'p, 's, 't, I, O, SaB, PlcpB, P> Sync for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
where P: Sync, PlcpB: Sync, I: Sync, SaB: Sync, O: Sync,

§

impl<'p, 's, 't, I, O, SaB, PlcpB, P> Unpin for PlcpConstruction<'p, 's, 't, I, O, SaB, PlcpB, P>
where P: Unpin, PlcpB: Unpin, SaB: Unpin, O: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.