]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
* matrix:;pow(): Fix exponent==0 case.
[ginac.git] / ginac / matrix.h
index 26783eabf256c25a35e1fddfeccf5d8f4e7c02da..518684ca186f5f443f07e8c2b0ac74de2bea95d6 100644 (file)
@@ -144,6 +144,13 @@ extern ex lst_to_matrix(const lst & l);
 /** Convert list of diagonal elements to matrix. */
 extern ex diag_matrix(const lst & l);
 
+/** Create a r times c unit matrix. */
+extern ex unit_matrix(unsigned r, unsigned c);
+
+/** Create a x times x unit matrix. */
+inline ex unit_matrix(unsigned x)
+{ return unit_matrix(x, x); }
+
 } // namespace GiNaC
 
 #endif // ndef __GINAC_MATRIX_H__