]> www.ginac.de Git - ginac.git/blobdiff - ginac/archive.h
Faster archiving by adding a map from strings to idices in the atoms vector.
[ginac.git] / ginac / archive.h
index 8e98c82070ec799d9011fb08b301bfaef7dff14e..1d60f5317748f08d41e818b111acf90ccb56da57 100644 (file)
@@ -3,7 +3,7 @@
  *  Archiving of GiNaC expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2007 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
@@ -242,6 +242,11 @@ public:
 private:
        /** Vector of atomized strings (using a vector allows faster unarchiving). */
        mutable std::vector<std::string> atoms;
+       /** The map of from strings to indices of the atoms vectors allows for
+        *  faster archiving.
+        */
+       typedef std::map<std::string, archive_atom>::const_iterator inv_at_cit;
+       mutable std::map<std::string, archive_atom> inverse_atoms;
 
        /** Map of stored expressions to nodes for faster archiving */
        typedef std::map<ex, archive_node_id, ex_is_less>::iterator mapit;