ac-library-hs-1.1.0.0: Data structures and algorithms
Safe HaskellSafe-Inferred
LanguageGHC2021

AtCoder.Internal.String

Contents

Description

Internal implementation of AtCoder.String module.

Synopsis

Suffix array

saNaive :: HasCallStack => Vector Int -> Vector Int Source #

\(O(n^2)\) Internal implementation of suffix array creation (naive).

Since: 1.0.0.0

saDoubling :: HasCallStack => Vector Int -> Vector Int Source #

\(O(n \log n)\) Internal implementation of suffix array creation (doubling).

Since: 1.0.0.0

saIsImpl Source #

Arguments

:: HasCallStack 
=> Int

naive threshould

-> Int

doubling threshould

-> Vector Int

string

-> Int

upper bounds

-> Vector Int

suffix array

\(O(n)\) Internal implementation of suffix array creation (suffix array induced sorting).

Since: 1.0.0.0

saIs Source #

Arguments

:: HasCallStack 
=> Vector Int

string

-> Int

upper bounds

-> Vector Int

suffix array

\(O(n)\) Internal implementation of suffix array creation (suffix array induced sorting).

SA-IS, linear-time suffix array construction. Reference: G. Nong, S. Zhang, and W. H. Chan, Two Efficient Algorithms for Linear Time Suffix Array Construction

Since: 1.0.0.0

saIsManual Source #

Arguments

:: HasCallStack 
=> Int

naive threshold

-> Int

doubling threshold

-> Vector Int

string

-> Int

upper bounds

-> Vector Int

suffix array

\(O(n)\) Internal implementation of suffix array creation (suffix array induced sorting).

SA-IS, linear-time suffix array construction. Reference: G. Nong, S. Zhang, and W. H. Chan, Two Efficient Algorithms for Linear Time Suffix Array Construction

Since: 1.0.0.0