Mercurial > hg > may
changeset 469:11c8a8e66690
Add flipped (storage order)
author | Chris Cannam |
---|---|
date | Fri, 25 Oct 2013 17:37:05 +0100 |
parents | 38a35e4b41c5 |
children | 25d309d90d50 |
files | src/may/matrix/complex.yeti |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/may/matrix/complex.yeti Fri Oct 25 16:56:03 2013 +0100 +++ b/src/may/matrix/complex.yeti Fri Oct 25 17:37:05 2013 +0100 @@ -106,6 +106,13 @@ imaginary = maybe none (Some . mat.transposed) cm.imaginary, }; +flipped cm = + { + size = { rows = cm.size.columns, columns = cm.size.rows }, + real = maybe none (Some . mat.flipped) cm.real, + imaginary = maybe none (Some . mat.flipped) cm.imaginary, + }; + toSparse cm = (ts = maybe none (Some . mat.toSparse); cm with { real = ts cm.real, imaginary = ts cm.imaginary }); @@ -253,6 +260,7 @@ equal, conjugateTransposed, transposed, + flipped, toSparse, toDense, scaled, @@ -283,6 +291,7 @@ equal is complexmatrix -> complexmatrix -> boolean, conjugateTransposed is complexmatrix -> complexmatrix, transposed is complexmatrix -> complexmatrix, + flipped is complexmatrix -> complexmatrix, toSparse is complexmatrix -> complexmatrix, toDense is complexmatrix -> complexmatrix, scaled is number -> complexmatrix -> complexmatrix,