Feature request: methods to check matrix type are needed
SamoylovMD opened this issue · 2 comments
SamoylovMD commented
So, matrices can have some special forms, i.e. identical, diagonal, symmetric, skew-symmetric, upper/lower triangular. So, we could add these methods to Matrix
interface:
interface Matrix {
public boolean isIdentity();
public boolean isDiagonal();
...
}
SamoylovMD commented
Also, it could be used widely in algorithms testing, for example when we use Cholesky decomposer, we need to check the argument is symmetric and the result is lower-triangular.
vkostyukov commented
We do have Matrix.is
method that takes a MatrixPredicate
and does exactly what you described.