]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.cpp
Patches by Vladimir.
[ginac.git] / ginac / matrix.cpp
index 3f3b2e6fa93b34edaca43a427d94487db91bcd12..bc58245f8f0e7cc8cf33134ce30b80e2cddd8590 100644 (file)
@@ -1527,6 +1527,16 @@ int matrix::pivot(unsigned ro, unsigned co, bool symbolic)
        return k;
 }
 
+/** Function to check that all elements of the matrix are zero.
+ */
+bool matrix::is_zero_matrix() const
+{
+       for (exvector::const_iterator i=m.begin(); i!=m.end(); ++i) 
+               if(!(i->is_zero()))
+                       return false;
+       return true;
+}
+
 ex lst_to_matrix(const lst & l)
 {
        lst::const_iterator itr, itc;