newRPL: Simplified matrices proposal
|
06-01-2015, 07:20 PM
Post: #1
|
|||
|
|||
newRPL: Simplified matrices proposal
userRPL historically had 4 different objects for vectors and matrices:
Vectors (1D) Matrices (numeric only) Symbolic Vectors (implemented as lists) Symbolic Matrices (implemented as lists of lists) Here we propose to simplify all this into a single object type: Matrix. A matrix may contain real or complex numbers, or symbolic expressions mixed in. There is no difference between a symbolic matrix and a numeric one. Operations in newRPL follow generic overloadable operators, so addition and multiplication of individual elements can be done through the same generic operators and will automatically handle cross-type operations. Vectors are not distinguishable from matrices in newRPL. They share the same object type and same properties and operations. When working with matrices, the following intuitive rules apply:
This proposal wouldn't break existing code, except that all conversions between matrix/vector and algebraic/numeric matrix become unnecessary. In userRPL, multiplying a matrix by a vector works as described above, so it's nothing revolutionary but takes this concept a step further. In newRPL a row vector (1xN) can be transposed to get a column vector (Nx1) (unlike userRPL, where it has to be converted to a matrix first, then transposed). Multiplying two vectors of the same size becomes a dot product of vectors in newRPL (unless you specifically transpose one to make a (Nx1)x(1xN) multiplication, producing the expected (NxN) result). The storage model for unified matrices is already implemented, but the matrix/vector fusion is not (yet), and I think a little feedback could help refine the idea. Thoughts? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
newRPL: Simplified matrices proposal - Claudio L. - 06-01-2015 07:20 PM
RE: newRPL: Simplified matrices proposal - Werner - 06-01-2015, 08:48 PM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-02-2015, 12:46 AM
RE: newRPL: Simplified matrices proposal - Paul Dale - 06-01-2015, 10:24 PM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-02-2015, 01:37 AM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-02-2015, 12:19 PM
RE: newRPL: Simplified matrices proposal - rprosperi - 06-03-2015, 01:27 AM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-03-2015, 01:21 PM
RE: newRPL: Simplified matrices proposal - rprosperi - 06-05-2015, 11:41 PM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-08-2015, 12:50 PM
RE: newRPL: Simplified matrices proposal - 3298 - 06-08-2015, 04:39 PM
RE: newRPL: Simplified matrices proposal - Claudio L. - 06-08-2015, 06:16 PM
|
User(s) browsing this thread: 2 Guest(s)