GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing string-data-structure.github.io — Function | @string-data-structure/failure-function Function
Static Publicpublic build(p: ArrayLike, pi: number, pj: number, t: number[], ti: number) sourceComputes the failure function for input string. This is the "next[j]" table found in "Fast pattern matching in strings" by Knuth, Morris, and Pratt, although here indices are 0-based hence all indices and inputs are one less than in that paper. NOTE The main loop is somewhat unrolled for faster execution. This was not benchmarked. | ||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||