CoCoALib-0.9905 date: 23 May 2007


RingZ.H

Go to the documentation of this file.
00001 #ifndef CoCoA_RingZ_H
00002 #define CoCoA_RingZ_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 //---------------------------------------------------------------------------
00024 // RingZ() is the CoCoA ring representing the integers.
00025 
00026 
00027 namespace CoCoA
00028 {
00029 
00030   /*-----------------------------------------------------------------*/
00031   /** \include RingZ.txt  */
00032   /*-----------------------------------------------------------------*/
00033 
00034   class ring; // fwd decl, defined in ring.H.
00035   class RingHom; // fwd decl, defined in RingHom.H.
00036 
00037   const ring& RingZ();    ///< The unique ring of integers.
00038   bool IsZ(const ring& R);
00039   RingHom ZEmbeddingHom(const ring& codomain);
00040 
00041 } // end of namespace CoCoA
00042 
00043 
00044 
00045 // RCS header/log in the next few lines
00046 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/RingZ.H,v 1.1.1.1 2007/03/09 15:16:11 abbott Exp $
00047 // $Log: RingZ.H,v $
00048 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00049 // Imported files
00050 //
00051 // Revision 1.8  2007/03/05 21:22:26  cocoa
00052 // Better comments, renamed the embedding hom pseudo-ctor.
00053 //
00054 // Revision 1.7  2007/03/03 14:07:23  bigatti
00055 // -- "foundations" renamed into "GlobalManager"
00056 //
00057 // Revision 1.6  2007/03/02 10:47:53  cocoa
00058 // First stage of RingZ modifications -- tests do not compile currently, Anna will fix this.
00059 //
00060 // Revision 1.5  2006/12/06 17:21:55  cocoa
00061 // -- removed #include "config.H"
00062 //
00063 // Revision 1.4  2006/11/20 15:55:03  cocoa
00064 // ring is now a class again.  Improved definitions of operator-> in derived classes.
00065 //
00066 // Revision 1.3  2006/11/03 14:01:46  cocoa
00067 // -- changed: reference counting in ring, PPMonoids and OrdvArith now
00068 //    uses SmartPtrIRC
00069 //
00070 // Revision 1.2  2006/10/06 10:15:53  cocoa
00071 // In response to Susan's bug: a fiasco when compiling with CoCoA_MEMPOOL_DEBUG
00072 // set wrongly.  Moved several implementation classes out of their header files
00073 // into the implementation files.  Several functions had to be uninlined.
00074 // Also corrected position of #include, etc.
00075 //
00076 // Revision 1.1.1.1  2006/05/30 11:39:37  cocoa
00077 // Imported files
00078 //
00079 // Revision 1.8  2006/05/29 16:22:37  cocoa
00080 // Third time lucky???
00081 // Added myIsInteger member function to all rings (NYI for RingFloat).
00082 //
00083 // Revision 1.7  2006/05/12 16:10:58  cocoa
00084 // Added OpenMathFwd.H, and tidied OpenMath.H.
00085 // Many consequential but trivial changes.
00086 //
00087 // Revision 1.6  2006/03/21 09:43:14  cocoa
00088 // Changed names of some member fns of ideals (dealing with setting and testing
00089 // the flags for primeness and maximality).  Hope icc will complain less now.
00090 //
00091 // Revision 1.5  2006/03/15 18:09:31  cocoa
00092 // Changed names of member functions which print out their object
00093 // into myOutputSelf -- hope this will appease the Intel C++ compiler.
00094 //
00095 // Revision 1.4  2006/03/14 15:01:49  cocoa
00096 // Improved the implementation of ring member fns for computing powers.
00097 // Should keep Intel C++ compiler quieter too.
00098 //
00099 // Revision 1.3  2006/03/12 21:28:34  cocoa
00100 // Major check in after many changes
00101 //
00102 // Revision 1.2  2005/12/31 12:22:18  cocoa
00103 // Several minor tweaks to silence the Microsoft compiler:
00104 //  - added some missing #includes and using directives
00105 //  - moved some function defns into the right namespace
00106 //  - etc.
00107 //
00108 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
00109 // Imported files
00110 //
00111 // Revision 1.3  2005/09/30 15:03:39  cocoa
00112 // Minor cleaning and tidying.
00113 // DistrMPolyInlPP: use of summands now rather cleaner.
00114 //
00115 // Revision 1.2  2005/06/22 14:42:16  cocoa
00116 // Renamed MemPool data member to myMemMgr
00117 // (seems more sensible than myMemory).
00118 //
00119 // Revision 1.1.1.1  2005/05/03 15:47:31  cocoa
00120 // Imported files
00121 //
00122 // Revision 1.3  2005/04/19 14:06:04  cocoa
00123 // Added GPL and GFDL licence stuff.
00124 //
00125 // Revision 1.2  2005/02/11 14:15:20  cocoa
00126 // New style ring elements and references to ring elements;
00127 // I hope I have finally got it right!
00128 //
00129 // Revision 1.1.1.1  2005/01/27 15:12:13  cocoa
00130 // Imported files
00131 //
00132 // Revision 1.15  2004/11/18 18:33:40  cocoa
00133 // Now every ring know its own "one" element (as well as "zero").
00134 // Several consequential changes.
00135 //
00136 // Revision 1.14  2004/11/11 13:20:47  cocoa
00137 // -- added \include *.txt for doxygen
00138 //
00139 // Revision 1.13  2004/11/04 18:47:42  cocoa
00140 // (1) Ring member functions which previously expected mpz_t args
00141 //     now expect ZZ args.  Numerous minor consequential changes.
00142 // (2) Renamed function which gives access to the mpz_t value inside
00143 //     a ZZ object: previously was raw(...), now is mpzref(...).
00144 //     Plenty of calls had to be altered.
00145 //
00146 // Revision 1.12  2004/07/27 16:03:38  cocoa
00147 // Added IsCommutative test and IamCommutative member function
00148 // to all rings.  Tidied geobuckets a little.
00149 //
00150 // Revision 1.11  2004/07/16 15:45:12  cocoa
00151 // First stage of new RingElem implementation completed.
00152 //
00153 // Revision 1.10  2004/05/24 15:52:13  cocoa
00154 // Major update:
00155 //   new error mechanism
00156 //   many fixes
00157 //   RingHoms almost work now
00158 //   RingFloat much improved
00159 //
00160 // Revision 1.9  2004/04/08 15:33:34  cocoa
00161 // Added function IsInteger, and the related RingBase::myIsInteger
00162 // virtual function, plus all necessary implementations.
00163 //
00164 // Revision 1.8  2004/03/20 17:46:10  cocoa
00165 // Check in prior to departure to RWCA
00166 //
00167 // Revision 1.7  2004/02/03 16:16:20  cocoa
00168 // Removed pointless IamGCDDomain functions from several concrete rings.
00169 // Added IamOrderedDomain functions where appropriate.
00170 // Tidied ctors for the small finite fields.
00171 //
00172 // Revision 1.6  2004/01/30 14:07:10  cocoa
00173 // Tidied RingRawValue union: now it contains just two fields,
00174 // and has no need of forward declarations of types used internally
00175 // by the concrete rings -- it uses explicitly a void* instead.
00176 //
00177 // I have tidied the "import" functions used by most concrete rings.
00178 //
00179 // I have moved the choice of representation type for RingFp and RingFpLog
00180 // into a typedef in config.H -- this is to recognise that different
00181 // choices may work best on different platforms.
00182 //
00183 // Revision 1.5  2003/11/14 13:06:05  cocoa
00184 // -- New function "myIsPrintAtom" for printing polynomials and fractions
00185 //
00186 // Revision 1.4  2003/10/17 10:51:06  cocoa
00187 // Major cleaning, and new naming convention.
00188 //
00189 // Revision 1.3  2003/10/09 14:55:19  cocoa
00190 // - minor debugging after merge
00191 //
00192 // Revision 1.2  2003/10/09 12:16:38  cocoa
00193 // New coding convention for rings.
00194 //
00195 // Revision 1.15  2003/06/23 16:40:44  abbott
00196 // Prior to public release:
00197 //   changed class name to follow coding conventions
00198 //   updated characteristic following RingBase
00199 //   added IsIntegralDomain following RingBase
00200 //
00201 // Revision 1.14  2003/05/14 17:15:17  abbott
00202 // Several consequential changes stemming from revisions to ring.H;
00203 // most notably added support for homomorphisms and ideals.
00204 //
00205 // Revision 1.13  2002/11/15 11:23:27  abbott
00206 // Updated following the renaming in ring.H.
00207 // Decided to use the default implementation of IsZeroAddMul.
00208 //
00209 // Revision 1.12  2002/07/05 15:19:53  abbott
00210 // Added IsDivisible member function.
00211 // The zero element is now held through an auto_ptr (for exception cleanliness).
00212 //
00213 // Revision 1.11  2002/06/22 17:10:41  abbott
00214 // Changed name of "equal" member function to "IsEqual" (as per new ring.H).
00215 //
00216 // Revision 1.10  2002/06/03 13:32:26  abbott
00217 // Added compatibility with the new OrderedRing abstract class.
00218 //
00219 // Revision 1.9  2002/05/30 13:51:43  abbott
00220 // Added IsGCDDomain, IsField, and zero functions as required by the new ring.H.
00221 // Constructor and destructor are no longer inline (no real need to be, I hope).
00222 //
00223 // Revision 1.8  2002/05/15 15:05:01  abbott
00224 // General cleaning of the source.
00225 // Added negate, characteristic and power functions (req'd by new ring.H).
00226 // Made myMemory data member private -- previously it was public?!?
00227 //
00228 // Revision 1.7  2002/03/21 15:12:21  bigatti
00229 // - added IsZeroAddMul
00230 // - corrected pool name
00231 //
00232 // Revision 1.6  2002/02/15 11:59:21  bigatti
00233 // - added: gcd
00234 // - removed (virtual ... const) = 0
00235 //
00236 // Revision 1.5  2001/12/07 18:21:34  abbott
00237 // Changed names in accordance with the new coding conventions.
00238 //
00239 // Revision 1.4  2001/11/23 20:58:34  abbott
00240 // Added assignment from a long.
00241 //
00242 // Revision 1.3  2001/11/19 20:09:10  abbott
00243 // Added std:: prefix to identifiers from the standard library
00244 // (required by g++ version 3.0.2, and also properly correct).
00245 //
00246 // Revision 1.2  2001/11/06 16:46:47  abbott
00247 // Two main changes:
00248 //
00249 //  * alignment with the change to ring::raw_elem from void* to a union
00250 //
00251 //  * the elements of a ring_Z object are now pointers to mpz_t structs
00252 //    (rather than objects of class ZZ); the memory for the head of the
00253 //    mpz_t is managed by a MemPool belonging to the ring_Z.
00254 //
00255 // Revision 1.1  2001/10/31 20:37:12  abbott
00256 // Initial revision
00257 //
00258 
00259 #endif

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