From: MonkeeSage Date: 2006-09-12T10:35:37+09:00 Subject: Re: Matrix Dave Burt wrote: > If you want a matrix-like data structure (rather than a mathematical > matrix), why not use an array of arrays? A mathematical matrix is just a dimensional arrangement of data into "rows" and "columns", thus allowing for certain algorithmic relationships to be defined and applied (e.g., canonical decompositions). Every matrix (i.e., the actual matrix considered as a complex value) is immutable and has a unique identity, just like every number -- that's true -- but they can also be permuted or otherwise transformed into different matrices. Why should one have to do that constructively (i.e., construct a new matrix "from scratch"), rather than destructively (i.e., change the existing matrix "in place"). Think of it like this: n = 1; n = n + 1 -- even though the number 1 is immutable and has a unique identity, the reference to it is not, and can thus be destructively altered by assignment with the result that it refers to new identity. It would be a pain to have to do o = n + 1, p = n + 2 (i.e., creating new references every time the data changes), just because 1 is immutable. Why should a matrix be any different? Mabye I'm missing something...