CoCoALib-0.9905 date: 23 May 2007


RingDistrMPolyInlPP.H

Go to the documentation of this file.
00001 #ifndef CoCoA_RingDistrMPolyInlPP_H
00002 #define CoCoA_RingDistrMPolyInlPP_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 #include <vector>
00024 // using std::vector;
00025 
00026 namespace CoCoA
00027 {
00028 
00029   class symbol;         // forward declaration -- defined in symbol.H
00030   class PPOrdering;     // forward declaration -- defined in PPOrdering.H
00031   class SparsePolyRing; // forward declaration -- defined in SparsePolyRing.H
00032   class ring;           // forward declaration -- defined in ring.H
00033 
00034   // Pseudo-ctors for (sparse) polynomial rings.
00035 
00036   SparsePolyRing NewPolyRing_DMPI(const ring& CoeffRing, const std::vector<symbol>& IndetNames, const PPOrdering& ord);
00037   SparsePolyRing NewPolyRing_DMPI(const ring& CoeffRing, const std::vector<symbol>& IndetNames); ///< Default ordering is StdDegRevLex
00038   SparsePolyRing NewPolyRing_DMPI(const ring& CoeffRing, std::size_t NumIndets); ///< Default ordering is StdDegRevLex
00039 
00040   // The complete implementation is in RingDistrMPolyInlPP.C
00041 
00042 } // end of namespace CoCoA
00043 
00044 
00045 
00046 // RCS header/log in the next few lines
00047 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/RingDistrMPolyInlPP.H,v 1.1.1.1 2007/03/09 15:16:11 abbott Exp $
00048 // $Log: RingDistrMPolyInlPP.H,v $
00049 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00050 // Imported files
00051 //
00052 // Revision 1.7  2007/03/08 11:07:12  cocoa
00053 // Made pseudo ctors for polynomial rings more uniform.  This allowed me to
00054 // remove an include of CoCoA/symbol.H  from the RingDistrM*.H files, but then
00055 // I had to put the include in several .C files.
00056 //
00057 // Revision 1.6  2006/11/27 13:45:56  cocoa
00058 // -- removed #include "config.H"
00059 //
00060 // Revision 1.5  2006/11/24 17:25:00  cocoa
00061 // -- reorganized includes of header files
00062 //
00063 // Revision 1.4  2006/11/22 14:46:26  cocoa
00064 // -- added #include "CoCoA/symbol.H"
00065 //
00066 // Revision 1.3  2006/10/06 14:04:15  cocoa
00067 // Corrected position of #ifndef in header files.
00068 // Separated CoCoA_ASSERT into assert.H from config.H;
00069 // many minor consequential changes (have to #include assert.H).
00070 // A little tidying of #include directives (esp. in Max's code).
00071 //
00072 // Revision 1.2  2006/06/08 16:45:28  cocoa
00073 // -- RingDistrMPoly*.H  have been "moved" into RingDistrMPoly*.C
00074 // -- some coding conventions fixed in DistrMPoly*
00075 // -- functions wdeg and CmpWDeg have a common implementation in SparsePolyRing
00076 //
00077 // Revision 1.1.1.1  2006/05/30 11:39:37  cocoa
00078 // Imported files
00079 //
00080 // Revision 1.14  2006/05/29 16:22:37  cocoa
00081 // Third time lucky???
00082 // Added myIsInteger member function to all rings (NYI for RingFloat).
00083 //
00084 // Revision 1.13  2006/05/12 17:06:09  cocoa
00085 // -- moved myIsUnit, myGcd into SparsePolyRing (common implementation)
00086 //
00087 // Revision 1.12  2006/05/12 16:10:58  cocoa
00088 // Added OpenMathFwd.H, and tidied OpenMath.H.
00089 // Many consequential but trivial changes.
00090 //
00091 // Revision 1.11  2006/04/26 16:44:53  cocoa
00092 // -- myMul has now a single implementation in SparsePolyRing
00093 // -- myMul and mul in RingDistrMPoly* and DistrMPoly* have been disabled
00094 //
00095 // Revision 1.10  2006/03/21 09:43:14  cocoa
00096 // Changed names of some member fns of ideals (dealing with setting and testing
00097 // the flags for primeness and maximality).  Hope icc will complain less now.
00098 //
00099 // Revision 1.9  2006/03/17 18:10:27  cocoa
00100 // -- changed: myMul --> myMulByPP
00101 //
00102 // Revision 1.8  2006/03/16 15:23:16  cocoa
00103 // -- fixed comment: myMulByCoeff, myDivByCoeff *are* exception safe
00104 //
00105 // Revision 1.7  2006/03/15 18:09:31  cocoa
00106 // Changed names of member functions which print out their object
00107 // into myOutputSelf -- hope this will appease the Intel C++ compiler.
00108 //
00109 // Revision 1.6  2006/03/14 15:01:49  cocoa
00110 // Improved the implementation of ring member fns for computing powers.
00111 // Should keep Intel C++ compiler quieter too.
00112 //
00113 // Revision 1.5  2006/03/12 21:28:34  cocoa
00114 // Major check in after many changes
00115 //
00116 // Revision 1.4  2006/03/07 10:06:12  cocoa
00117 // -- fixed: PPMonoidElem LPP(f) now returns ConstRefPPMonoidElem
00118 //
00119 // Revision 1.3  2006/02/20 22:41:20  cocoa
00120 // All forms of the log function for power products now return SmallExponent_t
00121 // (instead of int).  exponents now resizes the vector rather than requiring
00122 // the user to pass in the correct size.
00123 //
00124 // Revision 1.2  2006/01/19 18:03:53  cocoa
00125 // -- fixed coding conventions for myGBasis, myGBasisValue
00126 // -- fixed myReduceMod (NF - tested)
00127 //
00128 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
00129 // Imported files
00130 //
00131 // Revision 1.6  2005/08/08 16:36:33  cocoa
00132 // Just checking in before going on holiday.
00133 // Don't really recall what changes have been made.
00134 // Added IsIndet function for RingElem, PPMonoidElem,
00135 // and a member function of OrdvArith.
00136 // Improved the way failed assertions are handled.
00137 //
00138 // Revision 1.5  2005/07/15 16:34:33  cocoa
00139 // Added iterators for sparse polynomials.
00140 // The code compiles (and the old tests still run).
00141 // It'd Friday evening -- I'm going home before
00142 // getting any ideas about making the iterator code run.
00143 //
00144 // Revision 1.4  2005/07/08 15:09:29  cocoa
00145 // Added new symbol class (to represent names of indets).
00146 // Integrated the new class into concrete polynomial rings
00147 // and PPMonoid -- many consequential changes.
00148 // Change ctors for the "inline" sparse poly rings: they no
00149 // longer expect a PPMonoid, but build their own instead
00150 // (has to be a PPMonoidOv).
00151 //
00152 // Revision 1.3  2005/07/01 16:08:16  cocoa
00153 // Friday check-in.  Major change to structure under PolyRing:
00154 // now SparsePolyRing and DUPolyRing are separated (in preparation
00155 // for implementing iterators).
00156 //
00157 // A number of other relatively minor changes had to be chased through
00158 // (e.g. IndetPower).
00159 //
00160 // Revision 1.2  2005/06/22 14:47:56  cocoa
00161 // PPMonoids and PPMonoidElems updated to mirror the structure
00162 // used for rings and RingElems.  Many consequential changes.
00163 //
00164 // Revision 1.1.1.1  2005/05/03 15:47:30  cocoa
00165 // Imported files
00166 //
00167 // Revision 1.3  2005/04/19 14:06:04  cocoa
00168 // Added GPL and GFDL licence stuff.
00169 //
00170 // Revision 1.2  2005/02/11 14:15:20  cocoa
00171 // New style ring elements and references to ring elements;
00172 // I hope I have finally got it right!
00173 //
00174 // Revision 1.1.1.1  2005/01/27 15:12:13  cocoa
00175 // Imported files
00176 //
00177 // Revision 1.16  2004/11/18 18:33:41  cocoa
00178 // Now every ring know its own "one" element (as well as "zero").
00179 // Several consequential changes.
00180 //
00181 // Revision 1.15  2004/11/09 16:10:13  cocoa
00182 // -- minor changes for doxygen
00183 //
00184 // Revision 1.14  2004/11/04 18:47:43  cocoa
00185 // (1) Ring member functions which previously expected mpz_t args
00186 //     now expect ZZ args.  Numerous minor consequential changes.
00187 // (2) Renamed function which gives access to the mpz_t value inside
00188 //     a ZZ object: previously was raw(...), now is mpzref(...).
00189 //     Plenty of calls had to be altered.
00190 //
00191 // Revision 1.13  2004/10/21 17:16:37  cocoa
00192 // Fairly major change: new OrdvArith namspace with various members,
00193 //   new global typedef  SmallExponent_t (defined in config.H).
00194 //
00195 // Revision 1.12  2004/07/27 16:03:39  cocoa
00196 // Added IsCommutative test and IamCommutative member function
00197 // to all rings.  Tidied geobuckets a little.
00198 //
00199 // Revision 1.11  2004/07/20 15:04:06  cocoa
00200 // The next step in the new "ring element" conversion process:
00201 // handling the case of creating a "const RefRingElem" object
00202 // (since C++ refuses to do this properly itself).
00203 //
00204 // Revision 1.10  2004/05/24 15:52:13  cocoa
00205 // Major update:
00206 //   new error mechanism
00207 //   many fixes
00208 //   RingHoms almost work now
00209 //   RingFloat much improved
00210 //
00211 // Revision 1.9  2004/04/08 15:33:34  cocoa
00212 // Added function IsInteger, and the related RingBase::myIsInteger
00213 // virtual function, plus all necessary implementations.
00214 //
00215 // Revision 1.8  2004/03/20 17:46:10  cocoa
00216 // Check in prior to departure to RWCA
00217 //
00218 // Revision 1.7  2004/01/30 14:07:10  cocoa
00219 // Tidied RingRawValue union: now it contains just two fields,
00220 // and has no need of forward declarations of types used internally
00221 // by the concrete rings -- it uses explicitly a void* instead.
00222 //
00223 // I have tidied the "import" functions used by most concrete rings.
00224 //
00225 // I have moved the choice of representation type for RingFp and RingFpLog
00226 // into a typedef in config.H -- this is to recognise that different
00227 // choices may work best on different platforms.
00228 //
00229 // Revision 1.6  2004/01/28 15:58:04  cocoa
00230 // Added myCmpDeg member function.
00231 //
00232 // Revision 1.5  2003/11/14 13:06:05  cocoa
00233 // -- New function "myIsPrintAtom" for printing polynomials and fractions
00234 //
00235 // Revision 1.4  2003/10/17 10:51:06  cocoa
00236 // Major cleaning, and new naming convention.
00237 //
00238 // Revision 1.3  2003/10/09 14:55:20  cocoa
00239 // - minor debugging after merge
00240 //
00241 // Revision 1.2  2003/10/09 12:16:38  cocoa
00242 // New coding convention for rings.
00243 //
00244 // Revision 1.7  2003/06/23 17:01:38  abbott
00245 // Minor cleaning prior to public release.
00246 // Name change, and consequential changes.
00247 //
00248 // Revision 1.6  2003/05/30 12:02:02  abbott
00249 // Fairly extensive changes: completed alignment with RingBase abstract
00250 // class, including adding homomorphisms and ideals.
00251 //
00252 // Revision 1.5  2002/11/18 18:02:53  abbott
00253 // COMPLETELY NEW VERSION.  All the real code has been moved to a new
00254 // class (called DMPI), so RingDistrMPolyInlPP is just "a nice front end".
00255 // This version appears to be a bit faster than older code, and simpler
00256 // too.
00257 //
00258 // Revision 1.4  2002/11/18 17:52:03  abbott
00259 // Checking only to have a complete record.  I think this once ran.
00260 // It will be replaced immediately by a completely new version.
00261 //
00262 // Revision 1.3  2002/07/05 15:32:51  abbott
00263 // Added member functions IsDivisible and power.
00264 //
00265 // Revision 1.2  2002/06/26 17:12:52  bigatti
00266 // - changed: MoveLT --> MoveLM
00267 // - added: CmpLPP(f,g);  mul(f,pp);  reduce(f,g);  AddClear(f,g);  AddMul3(f,h,g);
00268 //
00269 // Revision 1.1  2002/06/22 17:05:44  abbott
00270 // Initial revision
00271 //
00272 
00273 #endif

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