]> www.ginac.de Git - ginac.git/commitdiff
In power::expand_add(), don't reserve excess monomial sizes.
authorRichard Kreckel <kreckel@ginac.de>
Wed, 25 Nov 2015 10:28:10 +0000 (11:28 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 25 Nov 2015 11:12:14 +0000 (12:12 +0100)
There is no need to reserve n terms in each of the monomials of the
result of power(+(x,y,z...;0),n): We can compute it exactly as the
number of nonzero exponents in the multinomial expansion. The good
thing is that this counting is the same for each composition of a
partition, so it can be hoisted out of the loop over compositions.


No differences found