MCPcopy Create free account
hub / github.com/douchuan/algorithm / nnz

Method nnz

src/math/sparse_vector.rs:42–44  ·  view source on GitHub ↗

Returns the number of nonzero entries in this vector.

(&self)

Source from the content-addressed store, hash-verified

40
41 /// Returns the number of nonzero entries in this vector.
42 pub fn nnz(&self) -> usize {
43 self.st.size()
44 }
45
46 /// Returns the dimension of this vector.
47 pub fn dimension(&self) -> usize {

Callers 1

dotMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected