symengine icon indicating copy to clipboard operation
symengine copied to clipboard

Matrix expressions

Open rikardn opened this issue 3 years ago • 3 comments

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

rikardn avatar Jul 13 '22 18:07 rikardn

Also added:

  • HadamardProduct
  • MatrixSymbol
  • ImmutableDenseMatrix (dense matrix that is derived from Basic and MatrixExpr)

rikardn avatar Jul 18 '22 20:07 rikardn

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.

rikardn avatar Aug 04 '22 17:08 rikardn

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.

isuruf avatar Aug 11 '22 18:08 isuruf

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.

rikardn avatar Oct 22 '22 16:10 rikardn

Can this be merged?

rikardn avatar Dec 02 '22 15:12 rikardn

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.

rikardn avatar Feb 19 '23 15:02 rikardn