CoCoALib-0.9905 date: 23 May 2007


DistrMPoly.H

Go to the documentation of this file.
00001 #ifndef CoCoA_DistrMPoly_H
00002 #define CoCoA_DistrMPoly_H
00003 
00004 //   Copyright (c)  2005  Anna Bigatti
00005 
00006 //   This file is part of the source of CoCoALib, the CoCoA Library.
00007 
00008 //   CoCoALib is free software; you can redistribute it and/or modify
00009 //   it under the terms of the GNU General Public License (version 2)
00010 //   as published by the Free Software Foundation.  A copy of the full
00011 //   licence may be found in the file COPYING in this directory.
00012 
00013 //   CoCoALib is distributed in the hope that it will be useful,
00014 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //   GNU General Public License for more details.
00017 
00018 //   You should have received a copy of the GNU General Public License
00019 //   along with CoCoA; if not, write to the Free Software
00020 //   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 
00023 // Header file for the class DistrMPolyInlPP
00024 
00025 #include "CoCoA/assert.H"
00026 #include "CoCoA/SparsePolyRing.H"
00027 #include "CoCoA/PPMonoid.H"
00028 #include "CoCoA/MemPool.H"
00029 
00030 #include <cstddef>
00031 //using std::size_t;
00032 #include <iosfwd>
00033 // using std::ostream;
00034 #include <vector>
00035 // using std::vector;
00036 
00037 
00038 namespace CoCoA
00039 {
00040 
00041 
00042 /*-- class DistrMPoly ----------------------------------------------*/
00043 /**
00044 
00045   \brief Implementation of "clean" polynomials
00046 
00047   A summand of a DistrMPoly contains a RingElem and a PPMonoidElem so
00048   that the implementation is C++ cleaner than the strictly related
00049   class DistrMPolyInlPP
00050 
00051   \include DistrMPoly.txt
00052 
00053   */
00054 /*-----------------------------------------------------------------*/
00055   class DistrMPoly
00056   {
00057   private:
00058 
00059 //???    friend class PolyIter;
00060 
00061 /*-- struct summand -------------------------------------------------*/
00062 /**
00063    \brief summand of a DistrMPoly
00064 
00065    Very similar to the DistrMPolyInlPP summand, but the coefficient
00066    and the power-product are stored "cleanly" as a RingElem and a
00067    PPMonoidElem.  Being the size of these fileds fixed, we may use a
00068    static member "ourMemMgr" for summands of any RingDistrMPoly.
00069 
00070  \*-----------------------------------------------------------------*/
00071     struct summand
00072     {
00073     private: // use custom mem mgt for the summands
00074     public: //???? SHOULD THESE BE PRIVATE OR PUBLIC????
00075       static void operator delete(void* DeadObject, std::size_t sz);
00076       static void* operator new(std::size_t sz);
00077 
00078     public:
00079       summand(const ring& R, const PPMonoid& M);
00080       ~summand();
00081 
00082     public: // data members
00083       summand* myNext;  ///< pointer to next summand
00084       RingElem myCoeff; ///< coefficient of the summand (should be non-zero)
00085       PPMonoidElem myPP; ///< power-product of the summand
00086       static MemPool ourMemMgr; ///< memory mgr for summands of any RingDistrMPoly
00087 
00088     private:
00089       summand();                          ///< NEVER DEFINED: prohibited
00090       summand(const summand&);            ///< NEVER DEFINED: prohibited
00091       summand& operator=(const summand&); ///< NEVER DEFINED: prohibited
00092  };
00093 
00094     static void ourDeleteSummands(summand* ptr/*, const ring& R, const PPMonoid& M, MemPool& MemMgr*/);
00095 
00096   private:
00097     const ring myCoeffRing;   ///< the ring to which all the coeffs belong
00098     const PPMonoid myPPM;     ///< the PP monoid to which all the PPs belong
00099     MemPool& mySummandMemory; ///< the MemPool which manages the memory occupied by the summands
00100     summand** myEnd;          ///< pointer to facilitate implementing the one-past-the-last iterator
00101     summand* mySummands;      ///< pointer to the first summand
00102 
00103   public:
00104     DistrMPoly(const ring&, const PPMonoid&, MemPool&);
00105     DistrMPoly(const DistrMPoly& copy);
00106     ~DistrMPoly();
00107     DistrMPoly& operator=(const DistrMPoly& rhs);
00108     DistrMPoly& operator=(long rhs);
00109     DistrMPoly& operator=(const ZZ& rhs);
00110 
00111     friend bool IsCompatible(const DistrMPoly& f, const DistrMPoly& g);
00112     static std::size_t ourSummandSize(const ring&, const PPMonoid& PPM);
00113     static void ourSwap(DistrMPoly&, DistrMPoly&);
00114     summand* myCopySummand(const summand* original) const;
00115     // functions depending solely on the structure
00116     void myAssignZero();
00117 
00118     bool IsEqual(const summand* const lhs, const summand*const rhs) const;
00119     friend std::size_t NumTerms(const DistrMPoly& f);
00120     friend ConstRefRingElem LC(const DistrMPoly& f);
00121     //    friend RingElem content(const DistrMPoly& f);
00122     friend ConstRefPPMonoidElem LPP(const DistrMPoly& f);
00123     friend int CmpLPP(const DistrMPoly& f, const DistrMPoly& g);
00124     friend void MoveLM(DistrMPoly& f, DistrMPoly& g);
00125     void myDeleteLM();
00126 //     friend std::size_t StdDeg(const DistrMPoly& f);
00127 //     friend void wdeg(degree& d, const DistrMPoly& f);
00128 //     friend int CmpWDeg(const DistrMPoly& f, const DistrMPoly& g);
00129 //     friend long log(const DistrMPoly& f, std::size_t IndetIndex);
00130     void myAddMul(const DistrMPoly& h, const DistrMPoly& g, bool SkipLMg);
00131     void myWeylAddMul(const DistrMPoly& h, const DistrMPoly& g);
00132     void myReductionStep(const DistrMPoly& g);
00133     void myReductionStepGCD(const DistrMPoly& g, RefRingElem fscale);
00134     void myAddClear(DistrMPoly& g);
00135     void myAppendClear(DistrMPoly& g);
00136     friend void DivLM(DistrMPoly& lhs, const DistrMPoly& f, const DistrMPoly& g);
00137     void myMulByCoeff(RingElemConstRawPtr rawc);  // EXCEPTION SAFE
00138     void myDivByCoeff(RingElemConstRawPtr rawc);  // EXCEPTION SAFE
00139     void myMulByPP(PPMonoidElemConstRawPtr rawpp);
00140     void myWeylMul(PPMonoidElemConstRawPtr rawpp);
00141     void myPushFront(RingElemConstRawPtr rawc, const std::vector<long>& expv);
00142     void myPushBack(RingElemConstRawPtr rawc, const std::vector<long>& expv);
00143     void myPushFront(summand* t);
00144     void myPushBack(summand* t);
00145     void myRemoveSummand(summand** prev_link);
00146     void myInsertSummand(summand* s, summand** prev_link);
00147     friend bool IsZeroAddLCs(DistrMPoly& f, DistrMPoly& g);
00148     void myNegate();
00149 
00150     friend void add(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00151     friend void sub(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00152     //    friend void mul(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00153     friend bool div(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00154 //     friend void gcd(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00155     friend void output(std::ostream& out, const DistrMPoly& f); ///< for debugging only
00156 //     friend bool IsPrintAtom(const DistrMPoly& f);
00157 //     friend void output(OpenMathOutput& OMOut, const DistrMPoly& f);
00158     friend bool IsZero(const DistrMPoly& f);
00159 //     friend bool IsOne(const DistrMPoly& f);
00160 //     friend bool IsMinusOne(const DistrMPoly& f);
00161 //     friend bool IsConstant(const DistrMPoly& f);
00162 //     friend bool IsIndet(std::size_t& index, const DistrMPoly& f);
00163     friend bool IsMonomial(const DistrMPoly& f);
00164     friend bool IsEqual(const DistrMPoly& f, const DistrMPoly& g);
00165     friend void deriv(DistrMPoly& lhs, const DistrMPoly&, std::size_t IndetIndex);
00166     friend void deriv(DistrMPoly& lhs, const DistrMPoly& f, ConstRefPPMonoidElem x);
00167 
00168     friend void WeylMul(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00169     friend void WeylDiv(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00170   private:
00171      void myAddMulSummand(const summand* s, const DistrMPoly& g, bool SkipLMg);
00172      void myWeylAddMulSummand(const summand* s, const DistrMPoly& g, bool SkipLMg);
00173 
00174   public:
00175     class iter: public SparsePolyIterBase
00176     {
00177     public:
00178       explicit iter(const DistrMPoly& f);
00179       iter(const DistrMPoly& f, const summand* TermPtr);
00180       // Default copy ctor and assignment are fine
00181       // Default dtor is fine.
00182       iter* myClone() const;
00183       bool IamEnded() const;
00184       void myForward();
00185       iter& operator++();
00186       iter operator++(int);
00187       ConstRefRingElem myCoeff() const;
00188       ConstRefPPMonoidElem myPP() const;
00189 //???      bool operator==(const iter& i2) const;
00190 //???      bool operator!=(const iter& i2) const;
00191     protected:
00192       const void* myPolyPtr() const;
00193       const void* myTermPtr() const;
00194     private: // data members
00195       const DistrMPoly& myPoly;
00196       const summand* mySummand;
00197     };
00198 
00199   };
00200 
00201   void deriv(DistrMPoly& lhs, const DistrMPoly&, std::size_t IndetIndex);
00202   void deriv(DistrMPoly& lhs, const DistrMPoly& f, ConstRefPPMonoidElem x);
00203 
00204 
00205   // Friend functions - must also be declared outside the class (how very tedious).
00206   bool IsCompatible(const DistrMPoly& f, const DistrMPoly& g);
00207   std::size_t NumTerms(const DistrMPoly& f);
00208   ConstRefRingElem LC(const DistrMPoly& f);
00209   RingElem content(const DistrMPoly& f);
00210   ConstRefPPMonoidElem LPP(const DistrMPoly& f);
00211   int CmpLPP(const DistrMPoly& f, const DistrMPoly& g);
00212   void MoveLM(DistrMPoly& f, DistrMPoly& g);
00213   long log(const DistrMPoly& f, std::size_t IndetIndex);
00214   void DivLM(DistrMPoly& lhs, const DistrMPoly& f, const DistrMPoly& g);
00215   bool IsZeroAddLCs(DistrMPoly& f, DistrMPoly& g);
00216   void add(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00217   void sub(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00218   bool div(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00219   void gcd(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00220   void output(std::ostream& out, const DistrMPoly& f);
00221   bool IsPrintAtom(const DistrMPoly& f);
00222   void output(OpenMathOutput& OMOut, const DistrMPoly& f);
00223   bool IsZero(const DistrMPoly& f);
00224   bool IsOne(const DistrMPoly& f);
00225   bool IsMinusOne(const DistrMPoly& f);
00226   bool IsConstant(const DistrMPoly& f);
00227   bool IsIndet(std::size_t& index, const DistrMPoly& f);
00228   bool IsEqual(const DistrMPoly& f, const DistrMPoly& g);
00229   void deriv(DistrMPoly& lhs, const DistrMPoly&, std::size_t IndetIndex);
00230   void deriv(DistrMPoly& lhs, const DistrMPoly& f, ConstRefPPMonoidElem x);
00231 
00232   void WeylMul(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00233   void WeylDiv(DistrMPoly& lhs, const DistrMPoly& g, const DistrMPoly& h);
00234 
00235   // Inline functions.
00236 
00237   inline void DistrMPoly::summand::operator delete(void* DeadObject, std::size_t sz)
00238   {
00239     ourMemMgr.free(DeadObject, sz);
00240   }
00241 
00242 
00243   inline void* DistrMPoly::summand::operator new(std::size_t sz)
00244   {
00245     CoCoA_ASSERT(sz == sizeof(summand));
00246     return ourMemMgr.alloc(sz);
00247   }
00248 
00249 
00250   inline DistrMPoly::summand::summand(const ring& R, const PPMonoid& M):
00251       myNext(0),
00252       myCoeff(R),
00253       myPP(M)
00254   {}
00255 
00256   inline DistrMPoly::summand::~summand()
00257   {}
00258 
00259 
00260   inline std::size_t DistrMPoly::ourSummandSize(const ring&, const PPMonoid& /*PPM*/)
00261   {
00262     return sizeof(summand);
00263   }
00264 
00265 
00266   inline int CmpLPP(const DistrMPoly& f, const DistrMPoly& g)
00267   {
00268     CoCoA_ASSERT(!IsZero(f) && !IsZero(g));
00269     return (f.myPPM)->myCmp(raw(f.mySummands->myPP), raw(g.mySummands->myPP));
00270   }
00271 
00272 
00273   inline DistrMPoly::iter::iter(const DistrMPoly& f):
00274       myPoly(f),
00275       mySummand(f.mySummands)
00276   {}
00277 
00278 
00279   inline DistrMPoly::iter::iter(const DistrMPoly& f, const summand* TermPtr):
00280       myPoly(f),
00281       mySummand(TermPtr) // TermPtr *MUST* point to a term in f, or be NULL.
00282   {}
00283 
00284 
00285   inline DistrMPoly::iter* DistrMPoly::iter::myClone() const
00286   {
00287     return new iter(*this);
00288   }
00289 
00290 
00291   inline bool DistrMPoly::iter::IamEnded() const
00292   {
00293     return mySummand == 0;
00294   }
00295 
00296   inline bool IsEnded(const DistrMPoly::iter& i)
00297   {
00298     return i.IamEnded();
00299   }
00300 
00301 
00302   inline void DistrMPoly::iter::myForward()
00303   {
00304     CoCoA_ASSERT(!IamEnded());
00305     mySummand = mySummand->myNext;
00306   }
00307 
00308   inline DistrMPoly::iter& DistrMPoly::iter::operator++()
00309   {
00310     if (IamEnded()) CoCoA_ERROR(ERR::PolyIterEnded, "DistrMPoly::iter::op++");
00311     myForward(); //???mySummand = mySummand->myNext;
00312     return *this;
00313   }
00314 
00315 
00316   inline DistrMPoly::iter DistrMPoly::iter::operator++(int)
00317   {
00318     if (IamEnded()) CoCoA_ERROR(ERR::PolyIterEnded, "DistrMPoly::iter::op++");
00319     iter ans(*this);
00320     myForward(); //???mySummand = mySummand->myNext;
00321     return ans;
00322   }
00323 
00324 
00325   inline ConstRefRingElem DistrMPoly::iter::myCoeff() const
00326   {
00327     CoCoA_ASSERT(!IamEnded());
00328     return ConstRefRingElem(mySummand->myCoeff);
00329   }
00330 
00331   inline ConstRefRingElem coeff(const DistrMPoly::iter& i)
00332   {
00333     if (IsEnded(i)) CoCoA_ERROR(ERR::PolyIterEnded, "coeff(PolyIter)");
00334     return i.myCoeff();
00335   }
00336 
00337 
00338   inline ConstRefPPMonoidElem DistrMPoly::iter::myPP() const
00339   {
00340     CoCoA_ASSERT(!IamEnded());
00341     return ConstRefPPMonoidElem(mySummand->myPP);
00342   }
00343 
00344   inline ConstRefPPMonoidElem PP(const DistrMPoly::iter& i)
00345   {
00346     if (IsEnded(i)) CoCoA_ERROR(ERR::PolyIterEnded, "PP(PolyIter)");
00347     return i.myPP();
00348   }
00349 
00350 
00351 //   inline bool DistrMPoly::iter::operator==(const iter& i2) const
00352 //   {
00353 //     if (&myPoly != &(i2.myPoly)) CoCoA_ERROR(ERR::MixedPolyIters, "PolyIter == PolyIter");
00354 //     return mySummand == i2.mySummand;
00355 //   }
00356 
00357 //   inline bool DistrMPoly::iter::operator!=(const iter& i2) const
00358 //   {
00359 //     if (&myPoly != &(i2.myPoly)) CoCoA_ERROR(ERR::MixedPolyIters, "PolyIter != PolyIter");
00360 //     return mySummand != i2.mySummand;
00361 //   }
00362 
00363 
00364   inline const void* DistrMPoly::iter::myPolyPtr() const
00365   {
00366     return &myPoly;
00367   }
00368 
00369 
00370   inline const void* DistrMPoly::iter::myTermPtr() const
00371   {
00372     return mySummand;
00373   }
00374 
00375   inline void swap(DistrMPoly& f, DistrMPoly& g)
00376   {
00377     DistrMPoly::ourSwap(f, g);
00378   }
00379 
00380 } // end of namespace CoCoA
00381 
00382 
00383 
00384 // RCS header/log in the next few lines
00385 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/DistrMPoly.H,v 1.2 2007/03/12 16:00:29 bigatti Exp $
00386 // $Log: DistrMPoly.H,v $
00387 // Revision 1.2  2007/03/12 16:00:29  bigatti
00388 // -- moved myLog(F, index) into unique implementation in SparsePolyRing
00389 //
00390 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00391 // Imported files
00392 //
00393 // Revision 1.18  2007/03/07 13:42:46  bigatti
00394 // -- removed useless argument and other minor changes
00395 //
00396 // Revision 1.17  2007/01/11 14:04:18  cocoa
00397 // -- added prefix "raw" to RawPtr arguments names
00398 //
00399 // Revision 1.16  2006/12/07 17:36:19  cocoa
00400 // -- migrated  myRemoveBigContent myContent myPowerSmallExp  into
00401 //    single implementation in SparsePolyRing
00402 // -- removed  content  from DistrMPoly(..)
00403 //
00404 // Revision 1.15  2006/12/06 17:09:37  cocoa
00405 // -- removed #include "config.H"
00406 //
00407 // Revision 1.14  2006/11/23 18:01:53  cocoa
00408 // -- moved printing functions in unified implementation in SparsePolyRing
00409 // -- simplified "output(f)" for debugging only
00410 //
00411 // Revision 1.13  2006/11/21 18:09:24  cocoa
00412 // -- added myIsMonomial
00413 // -- implemented myIsOne, myIsMinusOne, myIsConstant, myIsIndet in SparsePolyRing
00414 // -- removed the 4 functions from DistrMPoly(..) and RingDistrMPoly(..)
00415 // -- changed all names of RawPtr arguments into "raw(..)"
00416 //
00417 // Revision 1.12  2006/11/14 17:17:13  cocoa
00418 // -- fixed coding convention "our"
00419 //
00420 // Revision 1.11  2006/11/09 17:46:58  cocoa
00421 // -- version 0.9712:
00422 // --   IdealImpl moved to SparsePolyRing from concrete rings
00423 // -- PolyList in GTypes is now vector<RingElem> (was list)
00424 // -- "my" coding convention applied to DistrMPoly
00425 //
00426 // Revision 1.10  2006/11/02 13:25:44  cocoa
00427 // Simplification of header files: the OpenMath classes have been renamed.
00428 // Many minor consequential changes.
00429 //
00430 // Revision 1.9  2006/10/16 23:19:00  cocoa
00431 // Corrected use of std::swap and various special swap functions.
00432 // Improved myApply memfn for homs of RingDistrMPolyInlPP.
00433 //
00434 // Revision 1.8  2006/10/12 20:28:26  cocoa
00435 // Added an assertion.
00436 //
00437 // Revision 1.7  2006/10/09 21:48:51  cocoa
00438 // Commented out "pointless" template specialization of std::swap.
00439 // Added overloading swap functions in CoCoA namespace.
00440 //
00441 // Revision 1.6  2006/10/06 14:04:16  cocoa
00442 // Corrected position of #ifndef in header files.
00443 // Separated CoCoA_ASSERT into assert.H from config.H;
00444 // many minor consequential changes (have to #include assert.H).
00445 // A little tidying of #include directives (esp. in Max's code).
00446 //
00447 // Revision 1.5  2006/10/06 10:00:18  cocoa
00448 // Added independent declarations of functions declared as friends -- permits
00449 // compilation with gcc-4.1 series.  Changes some friends into static member
00450 // functions.
00451 //
00452 // Revision 1.4  2006/08/07 21:23:25  cocoa
00453 // Removed almost all publicly visible references to SmallExponent_t;
00454 // changed to long in all PPMonoid functions and SparsePolyRing functions.
00455 // DivMask remains to sorted out.
00456 //
00457 // Revision 1.3  2006/07/20 17:06:08  cocoa
00458 // -- moved myStdDeg into SparsePolyRing
00459 //
00460 // Revision 1.2  2006/06/08 16:45:28  cocoa
00461 // -- RingDistrMPoly*.H  have been "moved" into RingDistrMPoly*.C
00462 // -- some coding conventions fixed in DistrMPoly*
00463 // -- functions wdeg and CmpWDeg have a common implementation in SparsePolyRing
00464 //
00465 // Revision 1.1.1.1  2006/05/30 11:39:36  cocoa
00466 // Imported files
00467 //
00468 // Revision 1.10  2006/05/12 16:10:59  cocoa
00469 // Added OpenMathFwd.H, and tidied OpenMath.H.
00470 // Many consequential but trivial changes.
00471 //
00472 // Revision 1.9  2006/04/26 16:44:53  cocoa
00473 // -- myMul has now a single implementation in SparsePolyRing
00474 // -- myMul and mul in RingDistrMPoly* and DistrMPoly* have been disabled
00475 //
00476 // Revision 1.8  2006/03/27 12:21:26  cocoa
00477 // Minor silly changes to reduce number of complaints from some compiler or other.
00478 //
00479 // Revision 1.7  2006/03/17 18:08:51  cocoa
00480 // -- changed: mul --> myMulByPP
00481 //
00482 // Revision 1.6  2006/03/16 17:52:16  cocoa
00483 // -- changed: mul, div --> myMulByCoeff, myDivByCoeff
00484 //
00485 // Revision 1.5  2006/03/12 21:28:34  cocoa
00486 // Major check in after many changes
00487 //
00488 // Revision 1.4  2006/03/07 10:06:12  cocoa
00489 // -- fixed: PPMonoidElem LPP(f) now returns ConstRefPPMonoidElem
00490 //
00491 // Revision 1.3  2006/02/20 22:41:20  cocoa
00492 // All forms of the log function for power products now return SmallExponent_t
00493 // (instead of int).  exponents now resizes the vector rather than requiring
00494 // the user to pass in the correct size.
00495 //
00496 // Revision 1.2  2006/02/13 13:17:41  cocoa
00497 // -- fixed: "const PPMonoidElem&" --> "ConstRefPPMonoidElem"
00498 //
00499 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
00500 // Imported files
00501 //
00502 // Revision 1.6  2005/08/08 16:36:33  cocoa
00503 // Just checking in before going on holiday.
00504 // Don't really recall what changes have been made.
00505 // Added IsIndet function for RingElem, PPMonoidElem,
00506 // and a member function of OrdvArith.
00507 // Improved the way failed assertions are handled.
00508 //
00509 // Revision 1.5  2005/07/19 15:30:20  cocoa
00510 // A first attempt at iterators over sparse polynomials.
00511 // Main additions are to SparsePolyRing, DistrMPoly*.
00512 // Some consequential changes to PPMonoid*.
00513 //
00514 // Revision 1.4  2005/07/15 16:34:33  cocoa
00515 // Added iterators for sparse polynomials.
00516 // The code compiles (and the old tests still run).
00517 // It'd Friday evening -- I'm going home before
00518 // getting any ideas about making the iterator code run.
00519 //
00520 // Revision 1.3  2005/07/01 16:08:16  cocoa
00521 // Friday check-in.  Major change to structure under PolyRing:
00522 // now SparsePolyRing and DUPolyRing are separated (in preparation
00523 // for implementing iterators).
00524 //
00525 // A number of other relatively minor changes had to be chased through
00526 // (e.g. IndetPower).
00527 //
00528 // Revision 1.2  2005/06/22 14:47:56  cocoa
00529 // PPMonoids and PPMonoidElems updated to mirror the structure
00530 // used for rings and RingElems.  Many consequential changes.
00531 //
00532 // Revision 1.1.1.1  2005/05/03 15:47:30  cocoa
00533 // Imported files
00534 //
00535 // Revision 1.3  2005/04/19 14:06:04  cocoa
00536 // Added GPL and GFDL licence stuff.
00537 //
00538 // Revision 1.2  2005/02/11 14:15:20  cocoa
00539 // New style ring elements and references to ring elements;
00540 // I hope I have finally got it right!
00541 //
00542 // Revision 1.1.1.1  2005/01/27 15:12:13  cocoa
00543 // Imported files
00544 //
00545 // Revision 1.8  2004/11/25 16:14:21  cocoa
00546 // (1) Fixed definition of specialization of std::swap template function
00547 //     so that it compiles with gcc 3.4.3
00548 // (2) Implemented monomial function for polynomial rings.
00549 // (3) Added one(PPM) and PPM->myOne() functions.
00550 //
00551 // Revision 1.7  2004/11/08 14:03:32  cocoa
00552 // -- small changes for doxygen support
00553 //
00554 // Revision 1.6  2004/10/21 17:16:37  cocoa
00555 // Fairly major change: new OrdvArith namspace with various members,
00556 //   new global typedef  SmallExponent_t (defined in config.H).
00557 //
00558 // Revision 1.5  2004/07/20 15:04:06  cocoa
00559 // The next step in the new "ring element" conversion process:
00560 // handling the case of creating a "const RefRingElem" object
00561 // (since C++ refuses to do this properly itself).
00562 //
00563 // Revision 1.4  2004/05/27 16:14:02  cocoa
00564 // Minor revision for new coding conventions.
00565 //
00566 // Revision 1.3  2004/05/24 15:52:14  cocoa
00567 // Major update:
00568 //   new error mechanism
00569 //   many fixes
00570 //   RingHoms almost work now
00571 //   RingFloat much improved
00572 //
00573 // Revision 1.2  2004/01/28 16:27:00  cocoa
00574 // Added the necessary for CmpDeg to work.
00575 //
00576 // Revision 1.1  2003/11/21 14:33:55  cocoa
00577 // -- First Import
00578 //
00579 
00580 #endif

Generated on Wed May 23 13:45:22 2007 for CoCoALib by  doxygen 1.4.6