pub struct Sam { /* private fields */ }Expand description
Suffix automaton with CSR (sorted-per-state) transitions — built once, queried by scans.
For the range-restricted recursion (fix b), each state also carries its endpos as a
contiguous slice [dfs_in, dfs_in+dfs_cnt) of epos (the end-positions in b, laid out by
a DFS of the suffix-link tree so a subtree is contiguous). A merge-sort tree over epos
answers “is there an end-position in [lo,hi] within this state’s subtree, and the min/max
such” — so the whole RO recursion runs on this one prebuilt SAM, with no sub-builds.
Auto Trait Implementations§
impl Freeze for Sam
impl RefUnwindSafe for Sam
impl Send for Sam
impl Sync for Sam
impl Unpin for Sam
impl UnsafeUnpin for Sam
impl UnwindSafe for Sam
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