Nemocas / AbstractAlgebra.jl

Generic abstract algebra functionality in pure Julia (no C dependencies)
https://nemocas.github.io/AbstractAlgebra.jl/dev/index.html
Other
171 stars 63 forks source link

ishessenberg does not check for square matrix #152

Closed wbhart closed 6 years ago

wbhart commented 6 years ago

Currently, we can only put a matrix in Hessenberg form if it is square. But we allow non-square matrices in ishessenberg. I'm just wondering if it was intentional, and whether we should return false or an exception if it is not square.

wbhart commented 6 years ago

Same question applies to similarity!, which applies a similarity transform. The code seems to only work for square matrices, and the docs seem to suggest we assume that. I'm wondering if there is a reason we don't test for squareness there, or whether I should just add that in.

thofma commented 6 years ago

I think returning false in ishessenberg sounds like a good option.

Regarding similarity!, I don't know what it is doing, but usually we don't check arguments for unsafe functions (exception is setindex!).

wbhart commented 6 years ago

Ok, thanks.