Add bool operator to mblas::matrix

This commit is contained in:
Tomasz Dwojak 2017-03-21 11:06:23 +00:00
parent d3615d2481
commit 697c1a6bb1

View File

@ -132,6 +132,11 @@ class TMatrix : public BaseMatrix {
return cols_ * rows_; return cols_ * rows_;
} }
operator bool() const {
return (int)size() != 0;
}
private: private:
size_t rows_; size_t rows_;
size_t cols_; size_t cols_;