From Christian.Bauer at Uni-Mainz.DE Fri Apr 4 05:00:20 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Fri, 4 Apr 2003 05:00:20 +0200 Subject: GiNaC 1.1.0 released Message-ID: <20030404030020.GB5577@thep.physik.uni-mainz.de> Lo! Receive now, mylords, version 1.1 of GiNaC, as a gift from one who has nothing, and as a memorial of macros and print_contexts. For now our fate is fulfilled, and-- Oops, I think I got the wrong script here. Anyway... Today, we'd like to present GiNaC 1.1.0. This is the first release since 1.0.0 to introduce incompatible API changes (hence the "1" after the first dot), but unless you are extending GiNaC with your own algebraic classes you probably won't notice (be sure, though, to check the change log for a list of things to watch out for). So rejoice, noble ladies and lords, and behold its mighty features: - Added stream manipulators dflt, latex, python, python_repr, tree, csrc, csrc_float, csrc_double, csrc_cl_N, index_dimensions and no_index_dimensions to control the output format. [That's, like, the coolest thing, if you ask me. Lets you, like, say "cout << latex", and then anything you print will be, like, in LaTeX code. Totally smooth, man...] - subs() accepts an optional "options" argument. The option subs_option::subs_algebraic enables "smart" substitutions in products and powers. [Brought to you by Chris Dams (the real one, not his substitute).] - The scalar_products mechanism allows the specification of an index dimension. [What could be beyond height and width, depth and time?] - Added ex::to_polynomial(). [ex::to_rational()'s evil twin brother.] - Removed deprecated macros is_ex_a, is_ex_exactly_a and friends for good. [Begone, macros! Begone!] - Removed dirac_gamma6/7(). [That's a feature?] - Made the hashing more simple and efficient. [Or so Richy claims...] 'Tis time, methinks, to join the feast: ftp://ftpthep.physik.uni-mainz.de/pub/GiNaC Good night, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ From chrisd at sci.kun.nl Wed Apr 23 12:03:04 2003 From: chrisd at sci.kun.nl (Chris Dams) Date: Wed, 23 Apr 2003 10:03:04 +0000 (UTC) Subject: patch for archiving. Message-ID: Hello, I found out that during archiving for every expression that is archived all nodes of the archive are searched to see if the expression is already there. This takes way too long for large archives. The solution is to have a map that stores where in the archive expressions are stored. A patch is included. All the best, Chris Dams -------------- next part -------------- =================================================================== RCS file: /home/cvs/GiNaC/ginac/archive.cpp,v retrieving revision 1.19.2.3 diff -r1.19.2.3 archive.cpp 53,59c53,60 < // Search for node in nodes vector < std::vector::const_iterator i = nodes.begin(), iend = nodes.end(); < archive_node_id id = 0; < while (i != iend) { < if (i->has_same_ex_as(n)) < return id; < i++; id++; --- > // Look if expression is known to be in some node already. > if(n.has_ex()) > { mapit i=exprtable.find(n.get_ex()); > if(i != exprtable.end()) > return i->second; > nodes.push_back(n); > exprtable[n.get_ex()]=nodes.size()-1; > return nodes.size()-1; 64c65 < return id; --- > return nodes.size()-1; 361a363,375 > /** Check if node is known to store an unarchived exression */ > bool archive_node::has_ex() const > { > return has_expression; > } > > /** Return unarchived version of expression stored in this node */ > ex archive_node::get_ex() const > { > return e; > } > > 546a561 > exprtable.clear(); Index: archive.h =================================================================== RCS file: /home/cvs/GiNaC/ginac/archive.h,v retrieving revision 1.17.2.3 diff -r1.17.2.3 archive.h 30a31 > #include 123a125,126 > bool has_ex() const; > ex get_ex() const; 238a242,245 > > /** Map of stored expressions to nodes for faster archiving */ > typedef std::map::iterator mapit; > mutable std::map exprtable; From chrisd at sci.kun.nl Thu Apr 24 16:13:21 2003 From: chrisd at sci.kun.nl (Chris Dams) Date: Thu, 24 Apr 2003 14:13:21 +0000 (UTC) Subject: patch for function::function Message-ID: Hello, I found out that if you use the constructor function::function(unsigned ser, const exprseq & es) to construct a function, this function does not get evaluated if the exprseq was already evaluated. The reason is that the expression sequence is copied with the exprseq::copy function and that this takes over the status flags of the already-evaluated exprseq. Therefore I think that the function function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser) { tinfo_key = TINFO_function; } that occurs in the script function.pl should be changed into function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser) { tinfo_key = TINFO_function; flags = flags & ~status_flags::evaluated; } All the best, Chris Dams From Christian.Bauer at Uni-Mainz.DE Wed Apr 30 16:56:28 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Wed, 30 Apr 2003 16:56:28 +0200 Subject: GiNaC 1.2 CVS branch Message-ID: <20030430145628.GA1387@thep.physik.uni-mainz.de> Hi! There is now a CVS branch for GiNaC 1.2, intended for all changes that are not binary compatible to 1.1. It can be accessed with the tag "ginac_1-2". Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ From Christian.Bauer at Uni-Mainz.DE Wed Apr 30 16:56:52 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Wed, 30 Apr 2003 16:56:52 +0200 Subject: patch for archiving. In-Reply-To: References: Message-ID: <20030430145652.GB1387@thep.physik.uni-mainz.de> Hi! On Wed, Apr 23, 2003 at 10:03:04AM +0000, Chris Dams wrote: > A patch is included. Ok. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ From Christian.Bauer at Uni-Mainz.DE Wed Apr 30 18:17:02 2003 From: Christian.Bauer at Uni-Mainz.DE (Christian Bauer) Date: Wed, 30 Apr 2003 18:17:02 +0200 Subject: patch for function::function In-Reply-To: References: Message-ID: <20030430161701.GC1387@thep.physik.uni-mainz.de> Hi! On Thu, Apr 24, 2003 at 02:13:21PM +0000, Chris Dams wrote: > Therefore I think that the function [...] that occurs in the script > function.pl should be changed into [...] Sounds reasonable. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/