Richard Kreckel [Sat, 6 Sep 2003 01:11:58 +0000 (01:11 +0000)]
* ginsh_input(): Modern versions of flex want us to use the macro
YY_CURRENT_BUFFER instead of accessing yy_current_buffer directly.
(I'm not sure about the preprocessor conditional, but asking whether
YY_CURRENT_BUFFER is defined appears to be the most natural strategy.)
Christian Bauer [Fri, 5 Sep 2003 19:58:11 +0000 (19:58 +0000)]
Improved the pre-/postorder iterators: They visit the root node and are now
only marginally slower than a recursive function like traverse(). The only
remaining problem is that for an expression consisting of only one primitive
object, ex::begin() and ex::end() return the same value, so the iteration
immediately stops without visiting the one existing node. We probably need
special versions of begin()/end() for creating pre-/postorder iterators after
all.
Christian Bauer [Fri, 29 Aug 2003 21:29:14 +0000 (21:29 +0000)]
Added const_iterator, const_preorder_iterator, const_postorder_iterator. The
pre-/postorder iterators don't visit the root node; this should probably be
fixed. The ex::traverse*() functions can then be removed.
Christian Bauer [Sun, 24 Aug 2003 22:55:54 +0000 (22:55 +0000)]
- implemented object fusion as proposed by Richy
- unit(), content() and primpart() take a "const ex &" instead of a
"const symbol &". degree(), coeff(), collect() etc. have dropped the
restriction to symbols a long time ago, so there's no reason for these
function to keep it.
Christian Bauer [Sun, 24 Aug 2003 22:53:39 +0000 (22:53 +0000)]
- quo(), rem(), prem(), sprem() and decomp_rational() take a "const ex &"
instead of a "const symbol &"
- get_symbol_stats(): the sym_desc_vec holds an ex instead of an (unsafe)
"const symbol *"
Christian Bauer [Sun, 24 Aug 2003 22:51:12 +0000 (22:51 +0000)]
- charpoly(): lambda is now a "const ex &" instead of a "const symbol &"
- slighly more efficient matrix constructors (avoid double initialization of m)
Richard Kreckel [Fri, 15 Aug 2003 01:27:01 +0000 (01:27 +0000)]
* acinclude.m4 (GINAC_CHECK_ERRORS): exit with non-zero return value on error.
Thus, debian/rules and similar environments can easily probe the return value
of configure and forego a hopeless compilation effort. This has been the
cause of much pain and suffering for the poor Debian m68k build daemon.
Christian Bauer [Thu, 31 Jul 2003 00:09:52 +0000 (00:09 +0000)]
- print_context::duplicate() wasn't virtual
- fixed static initialization order problem with the print_context registry
- print methods can use basic::print_dispatch<>() to re-enter the double
dispatch mechanism to defer to superclass methods
Christian Bauer [Fri, 25 Jul 2003 20:44:49 +0000 (20:44 +0000)]
implemented double dispatch for print(); methods are specified with
print_func<C>() options in the GINAC_IMPLEMENT_REGISTERED_CLASS_OPT macro
(see basic.cpp for an example); what remains is to convert all existing
classes to this new scheme...
Christian Bauer [Tue, 22 Jul 2003 21:27:46 +0000 (21:27 +0000)]
- added registry for print_context classes (use print_context_class_info::dump_hierarchy()
to show the class hierarchy tree)
- the default output format is now handled by the print_dflt type, but
print_context remains the base class for the print context hierarchy
- you can override the default output format for functions on a per-function
basis by specifying one or multiple print_func<C>() (C is a print_context
type) function options (see inifcns.cpp/abs() for an example)
- better LaTeX and C source output for abs()
Christian Bauer [Mon, 21 Jul 2003 22:09:41 +0000 (22:09 +0000)]
- split registered_class_info into the actual per-class data and the
"infrastructure"
- use registered_class_info::dump_hierarchy() to display the class hierarchy
tree as seen by GiNaC