]> www.ginac.de Git - ginac.git/blobdiff - ginac/symbol.cpp
documentation update
[ginac.git] / ginac / symbol.cpp
index 39f2335abcd1911c8e4460aaa1d16c0ba1989e8a..f099967cb095c349cba4a1b19320391c0b6fa2ad 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2002 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
@@ -32,7 +32,7 @@
 
 namespace GiNaC {
 
-GINAC_IMPLEMENT_REGISTERED_CLASS_NO_CTORS(symbol, basic)
+GINAC_IMPLEMENT_REGISTERED_CLASS(symbol, basic)
 
 //////////
 // default ctor, dtor, copy ctor, assignment operator and helpers
@@ -53,7 +53,7 @@ void symbol::copy(const symbol & other)
        TeX_name = other.TeX_name;
        serial = other.serial;
        asexinfop = other.asexinfop;
-       ++asexinfop->refcount;
+       ++(asexinfop->refcount);
 }
 
 void symbol::destroy(bool call_parent)
@@ -70,11 +70,6 @@ void symbol::destroy(bool call_parent)
 
 // public
 
-symbol::symbol(const symbol & other)
-{
-       copy(other);
-}
-
 symbol::symbol(const std::string & initname) : inherited(TINFO_symbol)
 {
        name = initname;
@@ -137,11 +132,6 @@ void symbol::archive(archive_node &n) const
 
 // public
 
-basic *symbol::duplicate() const
-{
-       return new symbol(*this);
-}
-
 void symbol::print(const print_context & c, unsigned level) const
 {
        if (is_a<print_tree>(c)) {
@@ -176,24 +166,6 @@ bool symbol::info(unsigned inf) const
                return inherited::info(inf);
 }
 
-int symbol::degree(const ex & s) const
-{
-       return is_equal(ex_to<basic>(s)) ? 1 : 0;
-}
-
-int symbol::ldegree(const ex & s) const
-{
-       return is_equal(ex_to<basic>(s)) ? 1 : 0;
-}
-
-ex symbol::coeff(const ex & s, int n) const
-{
-       if (is_equal(ex_to<basic>(s)))
-               return n==1 ? _ex1 : _ex0;
-       else
-               return n==0 ? *this : _ex0;
-}
-
 ex symbol::eval(int level) const
 {
        if (level == -max_recursion_level)