apfelmus wrote:
Note that the one usually adds an end of string character $ in the
Burrows-Wheeler transform for compression such that sorting rotated
strings becomes sorting suffices.
Yeah, I noticed that the output from by program can never actually be
reverted to its original form. ;-)
Andrew Coppin wrote:
apfelmus wrote:
Note that the one usually adds an end of string character $ in the
Burrows-Wheeler transform for compression such that sorting rotated
strings becomes sorting suffices.
Yeah, I noticed that the output from by program can never actually be
reverted to
Andrew Coppin wrote:
apfelmus wrote:
Note that the one usually adds an end of string character $ in the
Burrows-Wheeler transform for compression such that sorting rotated
strings becomes sorting suffices.
Yeah, I noticed that the output from by program can never actually be
reverted
I enjoy code like this that requires laziness. My modified version of your code
is below...
Bertram Felgenhauer wrote:
Code:
bwt implements a variation of the Burrows-Wheeler transform, using
\0 as a sentinel character for simplicity. The sentinel has to be smaller
than all other
On 6/23/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote:
rbwt implements the corresponding inverse BWT. It's a fun knot tying
exercise.
rbwt xs = let
res = sortBy (\(a:as) (b:bs) - a `compare` b) (zipWith' (:) xs res)
in
tail . map snd . zip xs $ head res
Indeed it's very fun
Felipe Almeida Lessa wrote:
On 6/23/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote:
rbwt implements the corresponding inverse BWT. It's a fun knot tying
exercise.
rbwt xs = let
res = sortBy (\(a:as) (b:bs) - a `compare` b) (zipWith' (:) xs
res)
in
tail . map snd . zip xs $
Felipe Almeida Lessa wrote:
On 6/23/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote:
rbwt implements the corresponding inverse BWT. It's a fun knot tying
exercise.
rbwt xs = let
res = sortBy (\(a:as) (b:bs) - a `compare` b) (zipWith' (:) xs res)
in
tail . map snd . zip xs $