MCPcopy Create free account
hub / github.com/daniel-e/rustml / empty

Method empty

src/matrix.rs:328–330  ·  view source on GitHub ↗

Returns `true` if matrix has no rows and no columns, i.e. the matrix does not contain an element. # Example ``` use rustml::Matrix; let m = Matrix::fill(1, 2, 2); assert!(!m.empty()); let n = Matrix:: ::new(); assert!(n.empty()); ```

(&self)

Source from the content-addressed store, hash-verified

326 /// assert!(n.empty());
327 /// ```
328 pub fn empty(&self) -> bool {
329 self.rows() == 0 && self.cols() == 0
330 }
331
332 /// Creates a matrix with random values.
333 ///

Callers 1

insert_columnMethod · 0.80

Calls 2

rowsMethod · 0.80
colsMethod · 0.80

Tested by

no test coverage detected