Documentation
¶
Index ¶
Constants ¶
const PrimeRK = 16777619
PrimeRK is the prime base used in Rabin-Karp algorithm.
Variables ¶
This section is empty.
Functions ¶
func HashStr ¶
HashStr returns the hash and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
func HashStrBytes ¶
HashStrBytes returns the hash and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
func HashStrRev ¶
HashStrRev returns the hash of the reverse of sep and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
func HashStrRevBytes ¶
HashStrRevBytes returns the hash of the reverse of sep and the appropriate multiplicative factor for use in Rabin-Karp algorithm.
func IndexRabinKarp ¶
IndexRabinKarp uses the Rabin-Karp search algorithm to return the index of the first occurrence of substr in s, or -1 if not present.
Types ¶
This section is empty.