From: Richard Kreckel Date: Thu, 9 Mar 2006 01:24:28 +0000 (+0000) Subject: * Don't expand elements of a matrix multiplication. X-Git-Tag: release_1-4-0~108 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=0cd17533caf2107d09918837ad6070869bb0cb29 * Don't expand elements of a matrix multiplication. --- diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index 5dc90e26..f62e2d40 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -580,10 +580,11 @@ matrix matrix::mul(const matrix & other) const for (unsigned r1=0; r1rows(); ++r1) { for (unsigned c=0; ccols(); ++c) { + // Quick test: can we shortcut? if (m[r1*col+c].is_zero()) continue; for (unsigned r2=0; r2