From: Christian Bauer Date: Mon, 31 Jan 2000 21:50:12 +0000 (+0000) Subject: - archive file format is a little more compact (stores property name and type X-Git-Tag: release_0-5-0~20 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=5378fa494d21758a9c750efa2a90b49f34692e4b - archive file format is a little more compact (stores property name and type as one unsigned value) - moved #include "config.h" from lortensor.h to lortensor.cpp (none of the public headers must include config.h) --- diff --git a/ginac/archive.cpp b/ginac/archive.cpp index 2b9ecdb7..058264d9 100644 --- a/ginac/archive.cpp +++ b/ginac/archive.cpp @@ -144,8 +144,8 @@ unsigned int archive::num_expressions(void) const * - unsigned root node ID * - unsigned number of nodes * - unsigned number of properties - * - unsigned type (PTYPE_*) - * - unsigned name atom + * - unsigned containing type (PTYPE_*) in its lower 3 bits and + * name atom in the upper bits * - unsigned property value * * Unsigned quantities are stored in a compressed format: @@ -202,8 +202,7 @@ ostream &operator<<(ostream &os, const archive_node &n) unsigned int num_props = n.props.size(); write_unsigned(os, num_props); for (unsigned int i=0; i>(istream &is, archive_node &n) unsigned int num_props = read_unsigned(is); n.props.resize(num_props); for (unsigned int i=0; i> 3; n.props[i].value = read_unsigned(is); } return is; @@ -562,7 +562,7 @@ void archive_node::printraw(ostream &os) const if (has_expression) os << "(basic * " << e.bp << " = " << e << ")\n"; else - os << "(no expression)\n"; + os << "\n"; // Dump properties vector::const_iterator i = props.begin(), iend = props.end(); diff --git a/ginac/archive.h b/ginac/archive.h index 50317b8f..396820b3 100644 --- a/ginac/archive.h +++ b/ginac/archive.h @@ -55,7 +55,7 @@ class archive_node friend istream &operator>>(istream &is, archive_node &ar); public: - archive_node() : a(*dummy_ar_creator()), has_expression(false) {} + archive_node() : a(*dummy_ar_creator()), has_expression(false) {} // hack for cint which always requires a default constructor archive_node(archive &ar) : a(ar), has_expression(false) {} archive_node(archive &ar, const ex &expr); ~archive_node() {} diff --git a/ginac/lortensor.cpp b/ginac/lortensor.cpp index 40144814..8a30034e 100644 --- a/ginac/lortensor.cpp +++ b/ginac/lortensor.cpp @@ -40,6 +40,7 @@ #include "power.h" #include "symbol.h" #include "utils.h" +#include "config.h" #ifndef NO_NAMESPACE_GINAC namespace GiNaC { diff --git a/ginac/lortensor.h b/ginac/lortensor.h index c02552a7..86bf70a0 100644 --- a/ginac/lortensor.h +++ b/ginac/lortensor.h @@ -26,7 +26,6 @@ #include #include #include -#include "config.h" #include "indexed.h" #include "lorentzidx.h"