CoCoALib-0.9905 date: 23 May 2007


SparsePolyRing.H

Go to the documentation of this file.
00001 #ifndef CoCoA_SparsePolyRing_H
00002 #define CoCoA_SparsePolyRing_H
00003 
00004 //   Copyright (c)  2005-2007  John Abbott
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 abstract class SparsePolyRingBase etc.
00024 
00025 
00026 #include "CoCoA/error.H"
00027 #include "CoCoA/ideal.H"
00028 #include "CoCoA/PolyRing.H"
00029 #include "CoCoA/PPMonoid.H"
00030 #include "CoCoA/RingHom.H"
00031 
00032 #include <cstddef>
00033 //using std::size_t;
00034 #include <iosfwd>
00035 //using std::ostream;
00036 #include <vector>
00037 //using std::vector;
00038 #include <memory>
00039 // using std::auto_ptr;
00040 
00041 
00042 namespace CoCoA
00043 {
00044 
00045   class symbol;  // fwd declaration -- defined in symbol.H
00046 
00047   class SparsePolyIter; // fwd declaration
00048   class SparsePolyIterBase
00049   {
00050   public:
00051     virtual ~SparsePolyIterBase() {};
00052     virtual SparsePolyIterBase* myClone() const = 0;
00053 
00054     virtual bool IamEnded() const = 0;
00055     virtual void myForward() = 0;
00056 //    virtual SparsePolyIter& operator++() = 0;
00057 //    virtual SparsePolyIter operator++(int) = 0;
00058     virtual ConstRefRingElem myCoeff() const = 0;
00059     virtual ConstRefPPMonoidElem myPP() const = 0;
00060 //    virtual bool operator==(const iter& i2) const = 0;
00061 //    virtual bool operator!=(const iter& i2) const = 0;
00062   protected:
00063     virtual const void* myPolyPtr() const = 0;
00064     virtual const void* myTermPtr() const = 0;
00065     friend class SparsePolyIter;
00066     friend bool operator==(const SparsePolyIter& i1, const SparsePolyIter& i2);
00067   };
00068 
00069   // This is a "smart pointer class" -- it owns the object pointed to.
00070   class SparsePolyIter
00071   {
00072   public:
00073     SparsePolyIter(SparsePolyIterBase* ptr);
00074     SparsePolyIter(const SparsePolyIter& copy);
00075     // Default dtor works OK
00076     SparsePolyIter& operator=(const SparsePolyIter& rhs);
00077     SparsePolyIterBase* operator->();
00078     const SparsePolyIterBase* operator->() const;
00079     SparsePolyIter& operator++();
00080     SparsePolyIter operator++(int);
00081   private:
00082     std::auto_ptr<SparsePolyIterBase> myIterPtr;
00083     friend bool IsEnded(const SparsePolyIter& i);
00084     friend ConstRefRingElem coeff(const SparsePolyIter& i);
00085     friend ConstRefPPMonoidElem PP(const SparsePolyIter& i);
00086     friend bool operator==(const SparsePolyIter& i1, const SparsePolyIter& i2);
00087   };
00088 
00089 
00090   class SparsePolyRingBase;
00091 
00092   /*-----------------------------------------------------------------*/
00093   /** \include SparsePolyRing.txt  */
00094   /*-----------------------------------------------------------------*/
00095   class SparsePolyRing: public PolyRing
00096   {
00097   public:
00098     explicit SparsePolyRing(const SparsePolyRingBase* RingPtr);
00099     // Default copy ctor works fine.
00100     // Default dtor works fine.
00101   private: // disable assignment
00102     SparsePolyRing& operator=(const SparsePolyRing& rhs); ///< NEVER DEFINED -- assignment disabled
00103   public:
00104     const SparsePolyRingBase* operator->() const; ///< allow member fns to be called
00105   };
00106 
00107 
00108   class SparsePolyRingBase: public PolyRingBase
00109   {
00110   public:
00111     ///@name Member functions every concrete SparsePolyRing implementation must have in addition to those of PolyRingBase.
00112     //@{
00113     virtual const PPMonoid& myPPM() const = 0;
00114     virtual std::size_t myGradingDim() const;
00115 
00116     virtual bool myIsValid(ConstRawPtr rawf) const;                        ///< true iff f is a valid representation, otherwise error
00117     virtual std::size_t myStdDeg(ConstRawPtr rawf) const;                  ///<  returns standard degree of f
00118     virtual long myLog(ConstRawPtr rawf, size_t index) const;                  ///<  returns the maximum exponent of x[index] in f
00119 ////    virtual void myWDeg(degree& d, ConstRawPtr rawf) const = 0;
00120 //    virtual int myCmpWDeg(ConstRawPtr rawf, ConstRawPtr rawg) const = 0; //pure???
00121     virtual ConstRefPPMonoidElem myLPP(ConstRawPtr rawf) const = 0;
00122     virtual void myContent(RawPtr rawcontent, ConstRawPtr rawf) const;
00123     virtual void myRemoveBigContent(RawPtr rawf) const;
00124     virtual void myMulByPP(RawPtr rawf, PPMonoidElemConstRawPtr rawpp) const = 0;
00125     //@}
00126 
00127     ///@name functions inherited from ring with a single implementation for all SparsePolyRing implementations
00128     //@{
00129     virtual void myMul(RawPtr rawlhs, ConstRawPtr rawx, ConstRawPtr rawy) const; ///< lhs = x*y
00130     virtual void myOutput(std::ostream& out, ConstRawPtr rawx) const;      ///< out << x
00131     virtual bool myIsPrintAtom(ConstRawPtr rawx) const;                    ///< x^n may be printed without parentheses
00132     virtual void myOutput(OpenMathOutput& OMOut, ConstRawPtr rawx) const;  ///< OMOut << x
00133     virtual bool myIsOne(ConstRawPtr rawf) const;                          ///< true iff rawf == 1
00134     virtual bool myIsMinusOne(ConstRawPtr rawf) const;                     ///< true iff rawf == -1
00135     virtual bool myIsConstant(ConstRawPtr rawf) const;                     ///< true iff rawf == c (possibly 0)
00136     virtual bool myIsIndet(std::size_t& IndetIndex, ConstRawPtr rawf) const;///< true iff rawf is x[IndetIndex]
00137     virtual bool myIsHomogeneous(ConstRawPtr rawf) const;                  ///< true iff f is homogeneous
00138     virtual void myHomog(RawPtr rawfHom, ConstRawPtr rawf, ConstRawPtr rawh) const;  ///< fHom = f homogenized with h (indet of wdeg 1, GrDim=1)
00139     virtual bool myIsInvertible(ConstRawPtr rawx) const;                   ///< true iff x is invertible
00140     virtual void myGcd(RawPtr rawlhs, ConstRawPtr rawx, ConstRawPtr rawy) const; ///< lhs = gcd(x,y) if GCDDomain;
00141     virtual bool myIsInteger(ZZ& N, ConstRawPtr rawx) const;               ///< true iff x is integer
00142     virtual bool myIsRational(ZZ& N, ZZ& D, ConstRawPtr rawx) const;       ///< true iff x is rational
00143     virtual ideal myIdealCtor(const std::vector<RingElem>& gens) const;
00144     virtual void myPowerSmallExp(RawPtr rawlhs, ConstRawPtr rawx, unsigned long n) const;// lhs = x^n, n>1, x not -1,0,1
00145     //@?
00146 
00147     ///@name   Functions for creating/building polynomials
00148     //@{
00149     virtual RingElem myMonomial(ConstRawPtr rawc, PPMonoidElemConstRawPtr rawpp) const = 0; // c is element of CoeffRing!!
00150     virtual SparsePolyIter myBeginIter(ConstRawPtr rawf) const = 0;
00151     virtual SparsePolyIter myEndIter(ConstRawPtr rawf) const = 0;
00152     virtual void myPushFront(RawPtr rawf, ConstRawPtr rawc, const std::vector<long>& expv) const = 0; /// SHOULD BE vector<ZZ> ????
00153     virtual void myPushBack(RawPtr rawf, ConstRawPtr rawc, const std::vector<long>& expv) const = 0; /// SHOULD BE vector<ZZ> ????
00154     //@}
00155 
00156     ///@name  Functions for homomorphisms
00157     //@{
00158     RingHom myHomCtor(const ring& codomain, const RingHom& CoeffHom, const std::vector<RingElem>& IndetImages) const;
00159     RingHom myCompose(const RingHom& phi, const RingHom& theta) const;
00160     //@}
00161 
00162     ///@name Special functions on polynomials needed for implementing Buchberger's Algorithm
00163     //@{
00164     virtual bool myIsZeroAddLCs(RawPtr rawf, RawPtr rawg) const = 0; ///< f+=LM(g); g-=LM(g); assumes LPP(f)==LPP(g); returns LC(f)+LC(g)==0
00165     virtual void myMoveLM(RawPtr rawf, RawPtr rawg) const = 0;       ///< f+=LM(g); g-=LM(g); assumes LM(f)<LM(g)
00166     virtual void myDeleteLM(RawPtr rawf) const = 0;            // ????? right interface
00167     virtual void myDivLM(RawPtr rawlhs, ConstRawPtr rawf, ConstRawPtr rawg) const = 0; ///< lhs=div(LM(f),LM(g)); assumes f!=0,g!=0
00168     virtual int  myCmpLPP(ConstRawPtr rawf, ConstRawPtr rawg) const = 0; ///< cmp(LPP(f),LPP(g)); assumes f!=0,g!=0
00169     virtual void myAddClear(RawPtr rawf, RawPtr rawg) const = 0;     ///< f+=g; g=0;
00170     virtual void myAppendClear(RawPtr rawf, RawPtr rawg) const = 0;  ///< f+=g; g=0; appends g to f with no checks
00171 
00172     enum SkipLMFlag { SkipLMg, DontSkipLMg }; // used only for AddMul
00173     virtual void myAddMul(RawPtr rawf, ConstRawPtr rawh, ConstRawPtr rawg) const = 0; ///<  f += LM(h)*g
00174     virtual void myAddMul(RawPtr rawf, ConstRawPtr rawh, ConstRawPtr rawg, SkipLMFlag) const = 0; ///<  f += LM(h)*g
00175     virtual void myReductionStep(RawPtr rawf, ConstRawPtr rawg) const = 0;
00176     // ??? aggiungere coefficiente
00177     virtual void myReductionStepGCD(RawPtr rawf, ConstRawPtr rawg, RefRingElem FScale) const = 0;
00178     // should it all be in ReductionStep ??? ANNA
00179     //@}
00180 
00181   protected: // Ideal class for this type of ring.
00182 
00183     class IdealImpl: public IdealBase
00184     {
00185     public:
00186       IdealImpl(const SparsePolyRing& P, const std::vector<RingElem>& gens);
00187       // default copy ctor is OK
00188       virtual IdealBase* clone() const;
00189 //???    virtual void swap(ideal& other);
00190 
00191       virtual const SparsePolyRing& myAmbientRing() const;
00192       virtual bool IamZero() const;
00193       virtual bool IamOne() const;
00194       virtual void myReduceMod(RingElemRawPtr rawx) const; // r elem of R, where I is ideal in R
00195       virtual bool contains(RingElemConstRawPtr rawx) const;
00196       virtual void add(const ideal&);
00197       virtual void intersect(const ideal&);
00198       virtual void colon(const ideal&);
00199       virtual void myDivMod(RingElemRawPtr rawlhs, RingElemConstRawPtr rawnum, RingElemConstRawPtr rawden) const; // lhs = num/den modulo the ideal  (lhs = 0 if quotient does not exist)
00200 
00201       virtual const std::vector<RingElem>& myGens() const; // gens as specified by user
00202       virtual const std::vector<RingElem>& myTidyGens() const; // tidier set of gens
00203     protected:
00204       virtual void myMaximalTest() const;
00205       virtual void myPrimeTest() const;
00206 
00207     protected: // Data members of SparsePolyRingBase::IdealImpl
00208       SparsePolyRing myP;
00209       std::vector<RingElem> myGensValue;
00210       mutable bool myGBasisIsValid;
00211       mutable std::vector<RingElem> myGBasisValue;
00212     protected: // Auxiliary functions.
00213       std::vector<RingElem>& myGBasis() const;
00214       static const SparsePolyRingBase::IdealImpl* GetPtr(const ideal& J);
00215     };  // class IdealImpl
00216 
00217   protected:  // General homomorphism class for this type of ring.
00218 
00219     class HomImpl: public RingHomBase
00220     {
00221     public:
00222       // HomImpl(const SparsePolyRing& domain, const ring& codomain, const std::vector<RingElem>& IndetImages); // algebra hom
00223       HomImpl(const SparsePolyRing& domain, const ring& codomain, const RingHom& CoeffHom, const std::vector<RingElem>& IndetImages);
00224       virtual void myApply(RingElemRawPtr rawimage, RingElemConstRawPtr rawarg) const;
00225     private:
00226       virtual void myOutputSelfDetails(std::ostream& out) const;
00227 
00228     private: // Data members of SparsePolyRingBase::HomImpl
00229       const RingHom myCoeffHom;
00230       const std::vector<RingElem> myIndetImages;
00231     };  // class HomImpl
00232 
00233   protected:  // Special homomorphism class for this type of ring.
00234 
00235     class CoeffEmbeddingHomImpl: public RingHomEmbeddingBase
00236     {
00237     public:
00238       CoeffEmbeddingHomImpl(const SparsePolyRing& P);
00239       virtual void myApply(RingElemRawPtr rawimage, RingElemConstRawPtr rawarg) const;
00240     };  // class CoeffEmbeddingHomImpl
00241 
00242   };
00243 
00244 
00245   SparsePolyRing NewPolyRing(const ring& CoeffRing, const PPMonoid& PPM);
00246   SparsePolyRing NewPolyRing(const ring& CoeffRing, const std::vector<symbol>& IndetNames, const PPOrdering& ord);
00247   SparsePolyRing NewPolyRing(const ring& CoeffRing, const std::vector<symbol>& IndetNames); ///< Default ordering is StdDegRevLex
00248   SparsePolyRing NewPolyRing(const ring& CoeffRing, std::size_t NumIndets); ///< Default ordering is StdDegRevLex
00249   bool IsSparsePolyRing(const ring& R);                         // inline
00250   SparsePolyRing AsSparsePolyRing(const ring& R);               // inline
00251   const PPMonoid& PPM(const SparsePolyRing& Rx);                // inline
00252   std::size_t GradingDim(const SparsePolyRing& Rx);             // inline
00253 
00254   ///@name Pseudo constructors for RingElems owned by SparsePolyRing
00255   //@{
00256   RingElem monomial(const SparsePolyRing& P, ConstRefRingElem c, ConstRefPPMonoidElem pp);
00257   RingElem monomial(const SparsePolyRing& P, const ZZ& N, ConstRefPPMonoidElem pp);
00258   RingElem monomial(const SparsePolyRing& P, long n, ConstRefPPMonoidElem pp);
00259   RingElem monomial(const SparsePolyRing& P, ConstRefRingElem c, const std::vector<long>& expv);
00260   RingElem monomial(const SparsePolyRing& P, const ZZ& N, const std::vector<long>& expv);
00261   RingElem monomial(const SparsePolyRing& P, long n, const std::vector<long>& expv);
00262   RefRingElem PushFront(RefRingElem f, ConstRefRingElem c, const std::vector<long>& expv); /// SHOULD BE vector<ZZ> ????
00263   RefRingElem PushBack(RefRingElem f, ConstRefRingElem c, const std::vector<long>& expv); /// SHOULD BE vector<ZZ> ????
00264   //@}
00265 
00266 
00267   ///@name Special functions on RingElems owned by SparsePolyRing
00268   //@{
00269   ConstRefPPMonoidElem LPP(ConstRefRingElem f);                 // inline
00270   degree wdeg(ConstRefRingElem f);
00271   int CmpWDeg(ConstRefRingElem f1, ConstRefRingElem f2);
00272   bool IsHomogeneous(ConstRefRingElem f);
00273   RingElem homog(ConstRefRingElem f, ConstRefRingElem h);       ///< homogenize f with indet h (GrDim=1, wdeg(h)=1)
00274   RingElem NR(ConstRefRingElem f, const std::vector<RingElem>& v); ///< Normal Remainder (remainder of the Division Algorithm).  If v is a GBasis it gives the Normal Form.
00275   SparsePolyIter BeginIter(ConstRefRingElem f);
00276   SparsePolyIter EndIter(ConstRefRingElem f);
00277   //@}
00278 
00279   bool IsZeroDim(const ideal& I);
00280 
00281 
00282   //----------------------------------------------------------------------
00283   // Inline functions
00284 
00285   inline bool IsSparsePolyRing(const ring& R)
00286   {
00287     return dynamic_cast<const SparsePolyRingBase*>(R.myRawPtr()) != 0;
00288   }
00289 
00290 
00291   inline SparsePolyRing AsSparsePolyRing(const ring& R)
00292   {
00293     if (!IsSparsePolyRing(R))
00294       CoCoA_ERROR(ERR::NotSparsePolyRing, "AsSparsePolyRing(ring)");
00295     return SparsePolyRing(static_cast<const SparsePolyRingBase*>(R.myRawPtr()));
00296   }
00297 
00298 
00299   inline SparsePolyRing::SparsePolyRing(const SparsePolyRingBase* RingPtr):
00300       PolyRing(RingPtr)
00301   {}
00302 
00303 
00304   inline const SparsePolyRingBase* SparsePolyRing::operator->() const
00305   {
00306     return static_cast<const SparsePolyRingBase*>(ring::operator->());
00307   }
00308 
00309 
00310   inline const PPMonoid& PPM(const SparsePolyRing& Rx)
00311   {
00312     return Rx->myPPM();
00313   }
00314 
00315 
00316   inline std::size_t SparsePolyRingBase::myGradingDim() const
00317   {
00318     return GradingDim(myPPM());
00319   }
00320 
00321   inline std::size_t GradingDim(const SparsePolyRing& Rx)
00322   {
00323     return Rx->myGradingDim();
00324   }
00325 
00326 
00327   inline ConstRefPPMonoidElem LPP(ConstRefRingElem f)
00328   {
00329     if (!IsSparsePolyRing(owner(f)))
00330       CoCoA_ERROR(ERR::NotElemSparsePolyRing, "LPP(f)");
00331     if (IsZero(f)) CoCoA_ERROR(ERR::ZeroPoly, "LPP(f)");
00332     return AsSparsePolyRing(owner(f))->myLPP(raw(f));
00333   }
00334 
00335 
00336   inline SparsePolyIter::SparsePolyIter(SparsePolyIterBase* ptr):
00337       myIterPtr(ptr)
00338   {}
00339 
00340 
00341   inline SparsePolyIter::SparsePolyIter(const SparsePolyIter& copy):
00342       myIterPtr(copy.myIterPtr->myClone())
00343   {}
00344 
00345 
00346   inline SparsePolyIter& SparsePolyIter::operator=(const SparsePolyIter& rhs)
00347   {
00348 //    if (&copy == this.get()) return *this;
00349     myIterPtr.reset(rhs.myIterPtr->myClone());
00350     return *this;
00351   }
00352 
00353 
00354   inline SparsePolyIterBase* SparsePolyIter::operator->()
00355   {
00356     return myIterPtr.get();
00357   }
00358 
00359 
00360   inline const SparsePolyIterBase* SparsePolyIter::operator->() const
00361   {
00362     return myIterPtr.get();
00363   }
00364 
00365 
00366   inline bool IsEnded(const SparsePolyIter& i)
00367   {
00368     return i.myIterPtr->IamEnded();
00369   }
00370 
00371 
00372   inline SparsePolyIter& SparsePolyIter::operator++()
00373   {
00374     if (myIterPtr->IamEnded()) CoCoA_ERROR(ERR::PolyIterEnded, "++PolyIter");
00375     myIterPtr->myForward();
00376     return *this;
00377   }
00378 
00379   inline SparsePolyIter SparsePolyIter::operator++(int)
00380   {
00381     if (myIterPtr->IamEnded()) CoCoA_ERROR(ERR::PolyIterEnded, "PolyIter++");
00382     SparsePolyIter ans(*this);
00383     myIterPtr->myForward();
00384     return ans;
00385   }
00386 
00387 
00388   inline ConstRefRingElem coeff(const SparsePolyIter& i)
00389   {
00390     if (IsEnded(i)) CoCoA_ERROR(ERR::PolyIterEnded, "coeff(PolyIter)");
00391     return i.myIterPtr->myCoeff();
00392   }
00393 
00394 
00395   inline ConstRefPPMonoidElem PP(const SparsePolyIter& i)
00396   {
00397     if (IsEnded(i)) CoCoA_ERROR(ERR::PolyIterEnded, "PP(PolyIter)");
00398     return i.myIterPtr->myPP();
00399   }
00400 
00401 
00402   inline bool operator==(const SparsePolyIter& i1, const SparsePolyIter& i2)
00403   {
00404     if (i1.myIterPtr->myPolyPtr() != i2.myIterPtr->myPolyPtr())
00405       CoCoA_ERROR(ERR::MixedPolyIters, "PolyIter==PolyIter");
00406     return i1.myIterPtr->myTermPtr() == i2.myIterPtr->myTermPtr();
00407   }
00408 
00409 
00410   inline bool operator!=(const SparsePolyIter& i1, const SparsePolyIter& i2)
00411   {
00412     return !(i1==i2);
00413   }
00414 
00415 
00416 } // end of namespace CoCoA
00417 
00418 
00419 
00420 // RCS header/log in the next few lines
00421 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/SparsePolyRing.H,v 1.3 2007/05/22 22:45:14 abbott Exp $
00422 // $Log: SparsePolyRing.H,v $
00423 // Revision 1.3  2007/05/22 22:45:14  abbott
00424 // Changed fn name IsUnit to IsInvertible.
00425 //
00426 // Revision 1.2  2007/03/12 16:00:29  bigatti
00427 // -- moved myLog(F, index) into unique implementation in SparsePolyRing
00428 //
00429 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00430 // Imported files
00431 //
00432 // Revision 1.23  2007/03/08 18:42:05  cocoa
00433 // Cleaned up whitespace.
00434 //
00435 // Revision 1.22  2007/03/08 11:07:12  cocoa
00436 // Made pseudo ctors for polynomial rings more uniform.  This allowed me to
00437 // remove an include of CoCoA/symbol.H  from the RingDistrM*.H files, but then
00438 // I had to put the include in several .C files.
00439 //
00440 // Revision 1.21  2007/02/10 18:44:03  cocoa
00441 // Added "const" twice to each test and example.
00442 // Eliminated dependency on io.H in several files.
00443 // Improved BuildInfo, and added an example about how to use it.
00444 // Some other minor cleaning.
00445 //
00446 // Revision 1.20  2007/01/20 14:07:25  bigatti
00447 // -- moved code for homomorphism into common implementation in SparsePolyRing
00448 //
00449 // Revision 1.19  2007/01/15 13:33:34  cocoa
00450 // -- added prefix "raw" to RawPtr arguments names
00451 //
00452 // Revision 1.18  2006/12/07 17:36:19  cocoa
00453 // -- migrated  myRemoveBigContent myContent myPowerSmallExp  into
00454 //    single implementation in SparsePolyRing
00455 // -- removed  content  from DistrMPoly(..)
00456 //
00457 // Revision 1.17  2006/12/06 17:25:43  cocoa
00458 // -- removed #include "config.H"
00459 //
00460 // Revision 1.16  2006/11/23 17:43:53  cocoa
00461 // -- minor change
00462 //
00463 // Revision 1.15  2006/11/22 17:51:31  cocoa
00464 // -- moved printing functions into unified implementation in SparsePolyRing
00465 //
00466 // Revision 1.14  2006/11/21 18:09:24  cocoa
00467 // -- added myIsMonomial
00468 // -- implemented myIsOne, myIsMinusOne, myIsConstant, myIsIndet in SparsePolyRing
00469 // -- removed the 4 functions from DistrMPoly(..) and RingDistrMPoly(..)
00470 // -- changed all names of RawPtr arguments into "raw(..)"
00471 //
00472 // Revision 1.13  2006/11/20 15:55:02  cocoa
00473 // ring is now a class again.  Improved definitions of operator-> in derived classes.
00474 //
00475 // Revision 1.12  2006/11/14 17:36:49  cocoa
00476 // -- fixed implementation for ideal in RingWeyl
00477 //
00478 // Revision 1.11  2006/11/09 17:46:58  cocoa
00479 // -- version 0.9712:
00480 // --   IdealImpl moved to SparsePolyRing from concrete rings
00481 // -- PolyList in GTypes is now vector<RingElem> (was list)
00482 // -- "my" coding convention applied to DistrMPoly
00483 //
00484 // Revision 1.10  2006/11/03 14:01:46  cocoa
00485 // -- changed: reference counting in ring, PPMonoids and OrdvArith now
00486 //    uses SmartPtrIRC
00487 //
00488 // Revision 1.9  2006/11/02 13:25:44  cocoa
00489 // Simplification of header files: the OpenMath classes have been renamed.
00490 // Many minor consequential changes.
00491 //
00492 // Revision 1.8  2006/10/06 14:04:15  cocoa
00493 // Corrected position of #ifndef in header files.
00494 // Separated CoCoA_ASSERT into assert.H from config.H;
00495 // many minor consequential changes (have to #include assert.H).
00496 // A little tidying of #include directives (esp. in Max's code).
00497 //
00498 // Revision 1.7  2006/08/17 09:45:07  cocoa
00499 // -- added: homogenization
00500 //
00501 // Revision 1.6  2006/08/07 21:23:25  cocoa
00502 // Removed almost all publicly visible references to SmallExponent_t;
00503 // changed to long in all PPMonoid functions and SparsePolyRing functions.
00504 // DivMask remains to sorted out.
00505 //
00506 // Revision 1.5  2006/07/20 17:06:08  cocoa
00507 // -- moved myStdDeg into SparsePolyRing
00508 //
00509 // Revision 1.4  2006/07/20 16:51:38  cocoa
00510 // -- added common implementation of myStdDeg
00511 //
00512 // Revision 1.3  2006/07/17 11:05:53  cocoa
00513 // -- added: myIsValid, myIsHomogeneous, IsHomogeneous
00514 //
00515 // Revision 1.2  2006/06/08 16:45:28  cocoa
00516 // -- RingDistrMPoly*.H  have been "moved" into RingDistrMPoly*.C
00517 // -- some coding conventions fixed in DistrMPoly*
00518 // -- functions wdeg and CmpWDeg have a common implementation in SparsePolyRing
00519 //
00520 // Revision 1.1.1.1  2006/05/30 11:39:37  cocoa
00521 // Imported files
00522 //
00523 // Revision 1.10  2006/05/29 16:22:37  cocoa
00524 // Third time lucky???
00525 // Added myIsInteger member function to all rings (NYI for RingFloat).
00526 //
00527 // Revision 1.9  2006/05/12 17:01:28  cocoa
00528 // -- added myIsUnit, myGcd whose implementation in RingDistr*** were identical
00529 //
00530 // Revision 1.8  2006/04/27 13:06:19  cocoa
00531 // -- just spaces
00532 //
00533 // Revision 1.7  2006/04/26 16:44:53  cocoa
00534 // -- myMul has now a single implementation in SparsePolyRing
00535 // -- myMul and mul in RingDistrMPoly* and DistrMPoly* have been disabled
00536 //
00537 // Revision 1.6  2006/04/21 14:58:04  cocoa
00538 // Removed myWDeg member function: it is no longer needed.
00539 //
00540 // Revision 1.5  2006/03/17 18:13:25  cocoa
00541 // -- changed: myMul --> myMulByPP
00542 //
00543 // Revision 1.4  2006/03/12 21:28:34  cocoa
00544 // Major check in after many changes
00545 //
00546 // Revision 1.3  2006/03/07 10:11:06  cocoa
00547 // -- fixed:  PPMonoidElem myLPP/LPP now return ConstRefPPMonoidElem
00548 //
00549 // Revision 1.2  2006/01/19 16:34:42  cocoa
00550 // -- added NF, myReduceMod functions (not yet tested)
00551 //
00552 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
00553 // Imported files
00554 //
00555 // Revision 1.5  2005/09/30 15:03:39  cocoa
00556 // Minor cleaning and tidying.
00557 // DistrMPolyInlPP: use of summands now rather cleaner.
00558 //
00559 // Revision 1.4  2005/08/08 16:36:32  cocoa
00560 // Just checking in before going on holiday.
00561 // Don't really recall what changes have been made.
00562 // Added IsIndet function for RingElem, PPMonoidElem,
00563 // and a member function of OrdvArith.
00564 // Improved the way failed assertions are handled.
00565 //
00566 // Revision 1.3  2005/07/19 15:30:20  cocoa
00567 // A first attempt at iterators over sparse polynomials.
00568 // Main additions are to SparsePolyRing, DistrMPoly*.
00569 // Some consequential changes to PPMonoid*.
00570 //
00571 // Revision 1.2  2005/07/15 16:34:33  cocoa
00572 // Added iterators for sparse polynomials.
00573 // The code compiles (and the old tests still run).
00574 // It'd Friday evening -- I'm going home before
00575 // getting any ideas about making the iterator code run.
00576 //
00577 // Revision 1.1  2005/07/01 16:08:16  cocoa
00578 // Friday check-in.  Major change to structure under PolyRing:
00579 // now SparsePolyRing and DUPolyRing are separated (in preparation
00580 // for implementing iterators).
00581 //
00582 // A number of other relatively minor changes had to be chased through
00583 // (e.g. IndetPower).
00584 //
00585 
00586 #endif

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