From: Christian Bauer Date: Wed, 28 Jan 2004 20:00:50 +0000 (+0000) Subject: synced to HEAD (expand_indexed) X-Git-Tag: release_1-1-7~21 X-Git-Url: https://www.ginac.de/ginac.git/tutorial/ginac.git?a=commitdiff_plain;h=c1ec421c602157f99fc6b2be723a1d901af7feea;p=ginac.git synced to HEAD (expand_indexed) --- diff --git a/ginac/indexed.cpp b/ginac/indexed.cpp index d513db0c..60d0ac4a 100644 --- a/ginac/indexed.cpp +++ b/ginac/indexed.cpp @@ -289,20 +289,24 @@ ex indexed::expand(unsigned options) const { GINAC_ASSERT(seq.size() > 0); - if ((options & expand_options::expand_indexed) && is_exactly_a(seq[0])) { - - // expand_indexed expands (a+b).i -> a.i + b.i - const ex & base = seq[0]; - ex sum = _ex0; - for (size_t i=0; i(newbase)) { + ex sum = _ex0; + for (size_t i=0; i(thisexprseq(s)).inherited::expand(options); } - return sum; - - } else - return inherited::expand(options); + } + return inherited::expand(options); } //////////