All I know about Cantor normal form is what I read in Wikipedia, but from what I see there you should just be able to box the normal forms and sort using the standard ordering.
More generally, what you are doing is called topological sorting. There are algorithms for it. I've never done it in J. Henry Rich On 8/17/2011 3:34 PM, Marshall Lochbaum wrote: > I have a list of things--specifically, ordinal numbers in Cantor normal > form--and an ordering relation that tells me whether the difference of two > of them is positive, negative, or zero (analogous to *@-~ for J numbers). Is > there an efficient J way to perform this sort? > > Marshall > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
