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