Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
sci.math.*
»
sci.math
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
matrices as vectors
Replies:
4
Last Post:
Feb 22, 2013 12:43 PM




Re: matrices as vectors
Posted:
Feb 20, 2013 1:04 PM


In article <496eaca679de4d35bd4b190428fb2af2@googlegroups.com>, leonard14279@gmail.com writes:
>Had the idea to represent a 2dmatrix as a 1dvector.
That's how most (if not all) programming languages do it.
>Need a function to map [ row, col ] indices to an index [ n ], and viceversa. > >Then the rest should be straightforward. > >So we have two functions ...
>Then the rest of the code can be refactored to use the 1dvector representation of a 2dmatrix. > >The question is, are there already existing formulas for matrix operations, where the matrix is represented as a 1dvector?
Yes, and this approach can be generalized to pdimensional arrays, as well. See any book on data structures, or possibly Section 8.9 of: <http://people.cis.ksu.edu/~schmidt/PPJv12pdf/ch8V12.pdf>
 Michael F. Stemper #include <Standard_Disclaimer> "Writing about jazz is like dancing about architecture"  Thelonious Monk



