nmatrix icon indicating copy to clipboard operation
nmatrix copied to clipboard

#symmetric? and #hermitian? for non-dense matrices

Open agisga opened this issue 10 years ago • 4 comments

It is probably not very hard to add Yale and List matrix support to #symmetric? and #hermitian?. It should go in nm_symmetric and nm_hermitian in ruby_nmatrix.c as far as I can tell. The dense methods are in dense.cpp and might be useful to look at when writing the code. There is also a Ruby version for #hermitian? (but none for #symmetric?) in math.rb, which does not defer to the C++ version and is, I think, redundant, see https://github.com/SciRuby/nmatrix/pull/335.

agisga avatar Mar 20 '15 01:03 agisga

Here it says Model it after yale/transp.template.c but there's no yale/transp.template.c file.

It is probably not very hard to add Yale and List matrix support to #symmetric?

I am not familiar with dense/non-dense representations. What does Yale and List matrix representation mean? Is it the same as non-dense representation? Is Yale and List matrix a part of Non-dense representation? What's the best place to get started with these storage types?

And thanks for making it easier by mentioning where the implementation code should go?

lokeshh avatar Jan 27 '16 18:01 lokeshh

@lokeshh

I am not familiar with dense/non-dense representations. What does Yale and List matrix representation mean? Is it the same as non-dense representation? Is Yale and List matrix a part of Non-dense representation? What's the best place to get started with these storage types?

Sorry, I have little understanding of sparse matrix formats. I found a stackoverflow question about the Yale format that @mohawkjohn has authored 4 years ago. So, maybe the Yale matrix format discussed therein is what NMatrix is using? I guess you will have to do some research.

agisga avatar Jan 28 '16 21:01 agisga

Ok, so I am getting started with implementing the methods for list type first. Then I will move to the yale type.

Is it fine to generate a PR even though it's not ready to be merged? I think it would be better to get some feedback along the way.

lokeshh avatar Jan 31 '16 12:01 lokeshh

Its fine. Just mark it WIP.

v0dro avatar Jan 31 '16 17:01 v0dro