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

Method nnz

JSAT/src/jsat/linear/Vec.java:90–96  ·  view source on GitHub ↗

Computes the number of non zero values in this vector @return the number of non zero values stored

()

Source from the content-addressed store, hash-verified

88 * @return the number of non zero values stored
89 */
90 public int nnz()
91 {
92 int nnz = 0;
93 for(IndexValue i : this)
94 nnz++;
95 return nnz;
96 }
97
98 /**
99 * Gets the value stored at a specific index in the vector

Callers 15

testSetCMethod · 0.95
testModelMethod · 0.95
passTestMethod · 0.95
getSparsityStatsMethod · 0.95
minMethod · 0.95
maxMethod · 0.95
dotMethod · 0.95
tenativeUpdateMethod · 0.95
pointToBytesMethod · 0.95
RegressionDataSetMethod · 0.95
transformMethod · 0.95
runMethod · 0.95

Calls

no outgoing calls

Tested by 15

testSetCMethod · 0.76
testModelMethod · 0.76
passTestMethod · 0.76
testNnzMethod · 0.36
testNnzMethod · 0.36
testNnzMethod · 0.36
testNnzMethod · 0.36
testMutableAdd_doubleMethod · 0.36
testGetRowViewMethod · 0.36
testSetMethod · 0.36
testIncrementMethod · 0.36