]> www.ginac.de Git - ginac.git/commitdiff
* ex.h: add docu.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 14 Mar 2001 21:31:28 +0000 (21:31 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 14 Mar 2001 21:31:28 +0000 (21:31 +0000)
* normal.cpp: make sqrfree_yun() static.
* basic.cpp (compare): slightly clarify syntax.

ginac/basic.cpp
ginac/ex.h
ginac/normal.cpp

index a7645ac5cba460d0622dcafc6df5b7223aaca22d..9fc4fa308526fdecb00235ab6f528210034759e0 100644 (file)
@@ -371,7 +371,8 @@ ex basic::derivative(const symbol & s) const
 /** Returns order relation between two objects of same type.  This needs to be
  *  implemented by each class. It may never return anything else than 0,
  *  signalling equality, or +1 and -1 signalling inequality and determining
- *  the canonical ordering. */
+ *  the canonical ordering.  (Perl hackers will wonder why C++ doesn't feature
+ *  the spaceship operator <=> for denoting just this.) */
 int basic::compare_same_type(const basic & other) const
 {
        return compare_pointers(this, &other);
@@ -502,16 +503,18 @@ int basic::compare(const basic & other) const
        
        GINAC_ASSERT(typeid(*this)==typeid(other));
        
-       int cmpval = compare_same_type(other);
-       if ((cmpval!=0) && (hash_this<0x80000000U)) {
+//     int cmpval = compare_same_type(other);
+//     if ((cmpval!=0) && (hash_this<0x80000000U)) {
 //             std::cout << "hash collision, same type: " 
 //                       << *this << " and " << other << std::endl;
 //             this->printraw(std::cout);
 //             std::cout << " and ";
 //             other.printraw(std::cout);
 //             std::cout << std::endl;
-       }
-       return cmpval;
+//     }
+//     return cmpval;
+       
+       return compare_same_type(other);
 }
 
 /** Test for equality.
index f2feba7338446cd0ab9257ac4955b5fab957d65d..ce0fe8c1686d30b33ae861c383ef739b438ca434 100644 (file)
@@ -39,7 +39,8 @@ class scalar_products;
 
 /** 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. */
+ *  provide methods for manipulation of these objects.  (Some people call such
+ *  a thing a proxy class.) */
 class ex
 {
        friend class basic;
index e9d883f53b12a74af830f2be921c7c8a6e3296ab..334bf95ae78647b496a193cd5d47b2f60269b090 100644 (file)
@@ -1698,7 +1698,7 @@ ex lcm(const ex &a, const ex &b, bool check_args)
  *            polynomial in x.
  *  @param x  variable to factor in
  *  @return   vector of factors sorted in ascending degree */
-exvector sqrfree_yun(const ex &a, const symbol &x)
+static exvector sqrfree_yun(const ex &a, const symbol &x)
 {
        int i = 0;
        exvector res;