MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / nnz

Method nnz

JSAT/src/jsat/linear/Matrix.java:580–583  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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

Callers 1

testCloneMethod · 0.95

Calls 2

rowsMethod · 0.95
colsMethod · 0.95

Tested by 1

testCloneMethod · 0.76