Returns the number of non zero values stored in this matrix. This is mostly useful for sparse matrices. @return the number of non zero values stored in this matrix.
()
| 578 | * @return the number of non zero values stored in this matrix. |
| 579 | */ |
| 580 | public long nnz() |
| 581 | { |
| 582 | return ((long)rows())*cols(); |
| 583 | } |
| 584 | |
| 585 | /** |
| 586 | * Returns {@code true} if the matrix is square, meaning it has the same |