From 0cd17533caf2107d09918837ad6070869bb0cb29 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 9 Mar 2006 01:24:28 +0000 Subject: [PATCH] * Don't expand elements of a matrix multiplication. --- ginac/matrix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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