vkostyukov/la4j

Feature request: methods to check matrix type are needed

SamoylovMD opened this issue · 2 comments

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();
    ...
}

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.

We do have Matrix.is method that takes a MatrixPredicate and does exactly what you described.