MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Rolling up some integers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33404] Rolling up some integers
  • From: "DIAMOND Mark R." <dot at dot.dot>
  • Date: Wed, 20 Mar 2002 01:53:10 -0500 (EST)
  • Organization: The University of Western Australia
  • Sender: owner-wri-mathgroup at wolfram.com

Can anyone see an easy way of  putting a fiven list of n^2 integers into an
n*n matrix along the diagonals---could be either not-snaking (preferred)
snaking. The *ordering*, but not necessarily the integers themselves, would
be

1 3 6
2 5 8
4 7 9

I would call this non-snaking, or  the following, snaking.

1 2 6
3 5 7
4 8 9

Please note,.

It occurred to me that this might be possible by first partitioning into
ascending and descending size lists representing each diagonal, but aside
from constructing an explicit secondary matrix of indices, I can't see
another way of doing it.

Cheers,

Mark
--
Mark R. Diamond
No spam email ROT13: znexq at cfl.hjn.rqh.nh
No crawler web page ROT13 uggc://jjj.cfl.hjn.rqh.nh/hfre/znexq





  • Prev by Date: the fastest way to read binary files
  • Next by Date: Re: newbie question - plot
  • Previous by thread: Re: the fastest way to read binary files
  • Next by thread: Re: Rolling up some integers