Is the sort you are looking for the Burrows Wheeler transform process?
----- Original Message ----- From: Raul Miller <[email protected]> To: Programming forum <[email protected]> Cc: Sent: Friday, October 4, 2013 9:58:08 PM Subject: Re: [Jprogramming] succinct de bruijn graphs The arguments are (from left to right): x: element to match on m: position y: sequence we match against In rank: 'position' is an index into y In select: 'position' is a count of matched elements Here's another example: 'c' (8) rank 'ctcaattacattgtcgaaga' 2 't' (5) select 'ctcaattacattgtcgaaga' 11 Does that help? Thanks, -- Raul On Fri, Oct 4, 2013 at 7:16 PM, Pascal Jasmin <[email protected]> wrote: > I don't get why the rank function needs a 1 or 0 parameter. > > rank 5 should see that 5{ is 1 and then count the number of occurrences > preceeding it? Or is the point that 0 (5) rank should return 2? > > Its unclear what you (or they) want to sort. > > > > ----- Original Message ----- > From: Raul Miller <[email protected]> > To: Programming forum <[email protected]> > Cc: > Sent: Friday, October 4, 2013 6:09:04 PM > Subject: [Jprogramming] succinct de bruijn graphs > > http://alexbowe.com/succinct-debruijn-graphs/ > > There's a bit of a linguistic conflict, here - the terms rank and > select used here are different from what a j programmer might expect: > > rank=: 1 :('m+/@{.=') > 1 (5) rank 0 1 1 0 1 0 0 1 0 0 > 3 > select=: 1 :('m i.~ +/\@:=') > 1 (4) select 0 1 1 0 1 0 0 1 0 0 > 7 > > But how might we implement the sort described here? > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
