From e65577fda9dd36e99f6923526f670a9696ba1b58 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Wed, 28 Feb 2001 23:30:45 +0000 Subject: [PATCH] * This is a deliberately silly commit. --- ginac/expairseq.cpp | 3 +++ ginac/mul.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 3e84134b..bad422cd 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -1301,6 +1301,9 @@ void expairseq::drop_coeff_0_terms(epvector::iterator &first_numeric, GINAC_ASSERT(i==current-seq.begin()); } +/** True if one of the coeffs vanishes, otherwise false. + * This would be an invariant violation, so this should only be used for + * debugging purposes. */ bool expairseq::has_coeff_0(void) const { for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) { diff --git a/ginac/mul.cpp b/ginac/mul.cpp index 70c161c2..887a9169 100644 --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -303,7 +303,7 @@ ex mul::coeff(const symbol & s, int n) const if (n==0) { // product of individual coeffs // if a non-zero power of s is found, the resulting product will be 0 - epvector::const_iterator it=seq.begin(); + epvector::const_iterator it = seq.begin(); while (it!=seq.end()) { coeffseq.push_back(recombine_pair_to_ex(*it).coeff(s,n)); ++it; @@ -311,15 +311,15 @@ ex mul::coeff(const symbol & s, int n) const coeffseq.push_back(overall_coeff); return (new mul(coeffseq))->setflag(status_flags::dynallocated); } - + epvector::const_iterator it=seq.begin(); - bool coeff_found=0; + bool coeff_found = 0; while (it!=seq.end()) { - ex t=recombine_pair_to_ex(*it); - ex c=t.coeff(s,n); + ex t = recombine_pair_to_ex(*it); + ex c = t.coeff(s,n); if (!c.is_zero()) { coeffseq.push_back(c); - coeff_found=1; + coeff_found = 1; } else { coeffseq.push_back(t); } -- 2.44.0