Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
(defvarl eof "\xDC00")
|
||||
|
||||
(defun bwt (str)
|
||||
(if (contains eof str)
|
||||
(error "~s: input may not contain ~a" %fun% eof))
|
||||
(let ((seof `@str@eof`))
|
||||
(flow 0..(len seof) (mapcar (op rot seof)) sort (mappend last))))
|
||||
|
||||
(defun ibwt (str)
|
||||
(let* ((ch (tuples 1 str))
|
||||
(row (sort ch)))
|
||||
(dotimes (i (pred (len str)))
|
||||
(upd row (mapcar append ch) nsort))
|
||||
[(find-if (op ends-with eof) row) 0..-1]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue