}
-/** Copy constructor of archive_node. */
-archive_node::archive_node(const archive_node &other)
- : a(other.a), props(other.props), has_expression(other.has_expression), e(other.e)
-{
-}
-
-
/** Assignment operator of archive_node. */
const archive_node &archive_node::operator=(const archive_node &other)
{
if (this != &other) {
- a = other.a;
+ // archive &a member doesn't get copied
props = other.props;
has_expression = other.has_expression;
e = other.e;
}
-/** Assignment operator of property_info. */
-const archive_node::property_info &archive_node::property_info::operator=(const property_info &other)
-{
- if (this != &other) {
- type = other.type;
- name = other.name;
- count = other.count;
- }
- return *this;
-}
-
-/** Assignment operator of property. */
-const archive_node::property &archive_node::property::operator=(const property &other)
-{
- if (this != &other) {
- type = other.type;
- name = other.name;
- value = other.value;
- }
- return *this;
-}
-
-
void archive::clear(void)
{
atoms.clear();
struct property_info {
property_info() {}
property_info(property_type t, const std::string &n, unsigned c = 1) : type(t), name(n), count(c) {}
- ~property_info() {}
-
- property_info(const property_info &other) : type(other.type), name(other.name), count(other.count) {}
- const property_info &operator=(const property_info &other);
property_type type; /**< Data type of property. */
std::string name; /**< Name of property. */
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() {}
- archive_node(const archive_node &other);
const archive_node &operator=(const archive_node &other);
/** Add property of type "bool" to node. */
struct property {
property() {}
property(archive_atom n, property_type t, unsigned v) : type(t), name(n), value(v) {}
- ~property() {}
-
- property(const property &other) : type(other.type), name(other.name), value(other.value) {}
- const property &operator=(const property &other);
property_type type; /**< Data type of property. */
archive_atom name; /**< Name of property. */
{
public:
expair() : rest(0), coeff(1) { }
- ~expair() { }
- expair(const expair & other) : rest(other.rest), coeff(other.coeff)
- {
- GINAC_ASSERT(is_exactly_a<numeric>(coeff));
- }
- const expair & operator=(const expair & other)
- {
- if (this != &other) {
- rest = other.rest;
- coeff = other.coeff;
- }
- return *this;
- }
-
+
/** Construct an expair from two ex. */
expair(const ex & r, const ex & c) : rest(r), coeff(c)
{
std::cerr << "(" << v1 << "," << v2 << "," << dim << ")";
}
-scalar_products::scalar_products(const scalar_products & other) : spm(other.spm) {}
-
-const scalar_products & scalar_products::operator=(const scalar_products & other)
-{
- if (this != &other) {
- spm = other.spm;
- }
- return *this;
-}
-
void scalar_products::add(const ex & v1, const ex & v2, const ex & sp)
{
spm[spmapkey(v1, v2)] = sp;
public:
spmapkey() : dim(wild()) {}
spmapkey(const ex & v1, const ex & v2, const ex & dim = wild());
- ~spmapkey() {}
bool operator==(const spmapkey &other) const;
bool operator<(const spmapkey &other) const;
* @see simplify_indexed */
class scalar_products {
public:
- scalar_products() {}
- ~scalar_products() {}
- scalar_products(const scalar_products & other);
- const scalar_products & operator=(const scalar_products & other);
-
/** Register scalar product pair and its value. */
void add(const ex & v1, const ex & v2, const ex & sp);