]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.h
Allow user to disable GiNaC::compile_ex (e.g. for security reasons).
[ginac.git] / ginac / ex.h
index 60ffa12934047f2054e3549be071d77849c6ea1a..783c89ee2fc204cdaed11f95d1477e1009180db0 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2006 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -52,23 +52,17 @@ private:
 /** For construction of flyweights, etc. */
 static library_init library_initializer;
 
-/** Rotate bits of unsigned value by one bit to the left.
-  * This can be necesary if the user wants to define its own hashes. */
-inline unsigned rotate_left(unsigned n)
-{
-       return (n & 0x80000000U) ? (n << 1 | 0x00000001U) : (n << 1);
-}
-
 class scalar_products;
 class const_iterator;
 class const_preorder_iterator;
 class const_postorder_iterator;
 
 
-/** Lightweight wrapper for GiNaC's symbolic objects.  Basically all it does is
- *  to hold a pointer to the other objects, manage the reference counting and
- *  provide methods for manipulation of these objects.  (Some people call such
- *  a thing a proxy class.) */
+/** Lightweight wrapper for GiNaC's symbolic objects.  It holds a pointer to
+ *  the other object in order to do garbage collection by the method of
+ *  reference counting.  I.e., it is a smart pointer.  Also, the constructor
+ *  ex::ex(const basic & other) calls the methods that do automatic
+ *  evaluation.  E.g., x-x turns automatically into 0. */
 class ex {
        friend class archive_node;
        friend inline bool are_ex_trivially_equal(const ex &, const ex &);
@@ -686,6 +680,7 @@ struct ex_swap : public std::binary_function<ex, ex, void> {
 
 // Make it possible to print exvectors and exmaps
 std::ostream & operator<<(std::ostream & os, const exvector & e);
+std::ostream & operator<<(std::ostream & os, const exset & e);
 std::ostream & operator<<(std::ostream & os, const exmap & e);
 
 // wrapper functions around member functions