Happy New Year!
Finalize 1.8.2 release. Oh, and Happy New Year!
Happy New Year!
Happy New Year!
Fix unarchiving empty containers. The bug was reported by Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>, see <https://www.ginac.de/pipermail/ginac-devel/2019-September/002399.html>.
Fix elusive bug in expairseq ctor. When an expair turns out to represent a number, that should go into the expairseq's overall_coeff. This was accomplished by class mul, thanks to the override of expair_needs_further_processing(), but not always for class add. This patch fixes the base class' expair_needs_further_processing() with similar logic as that already in place for class mul. Thanks to Mario Prausa for reporting this.
Happy New Year!
Shortcut conversion ex->numeric->ex in expairseq::make_flat(). Of course, passing an ex by reference is always faster than converting it to a numeric first (even if it is a numeric).
Happy New Year!
Happy New Year! Update copyright statements.
Use C++11 'auto' and range-based for loops where possible.
Happy New Year!
Hoist typeid(*this) from loops. The compilers don't seem to reliably recognize the invariance of this.
Remove expairseq::construct_from_2_ex_via_exvector() member function. This function is much slower than the optimized construct_from_2_ex() member function, which explains why it wasn't used.
Merge some cosmetic patches. This is a collection of some minor optimizations and indentation fixes.
Make .eval() evaluate top-level only. With the previous patch, some old workarounds have become unnecessary: If all expressions are evaluated, any object which is an aggregate of expressions will only ever have to evaluate the top level. As such, it has become pointless to evaluate child objects of an expression prior to doing its own term-rewriting. This patch removes the evaluation of children from all GiNaC objects. It also removes the now superfluous parameter 'level' of the eval methods.
Make add::eval(), mul::eval() work without compromise. If a user asks to evaluate an object, the expectation is that the library returns an evaluated, canonical expression. Everything else is a bug. (It doesn't matter whether the user asks explicitly or by assigning to an ex.) It turns out that it was possible to construct objects which didn't fully evaluate. This patch fixes this by making eval() a little bit more careful. This obsoletes the need to go through combine_ex_with_coeff_to_pair() when constructing an epvector that is then used to construct an add or mul. (Alas, this was omitted frequently enough...)
Improve method of setting status_flags::dynallocated. There seems to be no way to obsolete the need to mark an object derived from basic and handled by ex as being 'on the heap', at least none that doesn't have significant performance impact. Having said that, this patch aims at making this process simpler and more intuitive. Where, before, one would return from a function returning an ex with return (new mul(a, b))->setflag(status_flags::dynallocated); this patch lets us return with return dynallocate<mul>(a, b); which should be much clearer. In any case, it involves less typing. The two points where the status_flags::dynallocated are set are now * the dynallocate<B>(args...) template function and * the virtual duplicate() member functions. This patch rolls out the new functionality throughout the library.
Use initializer lists to construct container<>, lst. Add constructor of initializer_list<ex> to container<C<ex>>. In particular, this means that we can finally declare lst objects as lst{a,2*b,2}. Convert GiNaC to this syntax throughout. Deprecate the old constructors taking 1..16 ex parameters and the ones from comma seaparated lists (without braces).
Standard header cleanup. Sanitize some standard headers, remove include directives of unused headers, complete configure check for used standard headers.