Matrix expressions
A start for Matrix expressions
-
IdentityMatrix -
ZeroMatrix -
DiagonalMatrix(immutable special case matrix literal) -
MatrixAdd
Test functions for matrix expressions:
-
is_zero -
is_real -
is_symmetric -
is_square -
is_diagonal -
is_lower -
is_upper -
is_toeplitz
Also added:
- HadamardProduct
- MatrixSymbol
- ImmutableDenseMatrix (dense matrix that is derived from Basic and MatrixExpr)
This is ready for review. I apologise for the massive PR. I don't think the error is related to this PR, but not sure. Any thoughts on that would be appreciated.
Can you combine the headers is_foo.h into one header? There's really no reason to have a header with just one function in it.
Also, I'm not a fan of adding one file per function is_foo.cpp. This would increase the compilation time significantly, though it increases the readability too.
Moved declarations of all is_ functions to matrix_expressions.h. On the cpp file side I find things much easier to find and read with one file per class or function implementation. Let me know @isuruf if you don't think it is ok.
Can this be merged?
I finally got this rebased and through the tests. I'll merge now and further work can go into new PRs. Thanks @isuruf for reviewing.