
#include <PolyRing.H>
Inheritance diagram for CoCoA::PolyRing:
Public Member Functions  
PolyRing (const PolyRingBase *RingPtr)  
const PolyRingBase *  operator> () const 
Allow const member fns to be called.  
const RingBase *  myRawPtr () const 
Used by "downcasting" functions IsRingFp, AsRingFp, etc. 
Copyright (c) 2005 John Abbott Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2; with no Invariant Sections, no FrontCover Texts, and no BackCover Texts. A copy of the licence is included in the file COPYING in this directory. User documentation for PolyRing (and elements of a PolyRing) ============================================================ PolyRing is an abstract class representing rings of polynomials. The polynomials may be (dense) univariate or (sparse) multivariate. Only a few operations are available at this level of abstraction. Use SparsePolyRing or DUPolyRing for more operations on polynomials of known representation. Currently there are two functions to create a polynomial ring: NewPolyRing(CoeffRing, NumIndets) NewPolyRing(CoeffRing, NumIndets, IndetName) CoeffRing is the ring of coefficients (must be commutative), NumIndets specifies how many indeterminates there are; by default the indet names will be x[0],..x[NumIndets1], and the ordering is StdDegRevLex  see PPOrdering.txt. If the third parameter is specified then it is used in place of "x" in the indet names; we advise you to restrict to names comprising only letters (to be sure of future compatibility). Operations on a PolyRing  Let P be an object of type [PolyRing]. Let R be an object of type [ring]. NumIndets(P)  the number of indeterminates in P. CoeffRing(P)  the ring of coefficients of P. IsPolyRing(R)  returns true if the CoCoA::ring R is indeed a PolyRing. AsPolyRing(R)  returns a PolyRing refering to the ring underlying R. indets(P)  a const std::vector of RingElems whose ith element is the ith indeterminate in P. indet(P,i)  the ith indet of P as a RingElem. IndetPower(P,i,n)  the nth power of the ith indet of P as a RingElem. Operations on Elements of a PolyRing  In addition to the standard ring operations, elements of a PolyRing may used in other functions. Let P denote a polynomial ring. Let f denote a nonconst element of P. Let f1, f2 denote const elements of P. owner(f1)  the owner of f as a ring; NB to get the owner as a PolyRing use AsPolyRing(owner(f1)). NumTerms(f1)  the number of terms in f1. StdDeg(f1)  the total degree of f1; error if f1 is 0. deg(f1)  same as StdDeg(f1). log(f1, var)  maximum exponent of var in f1 where var is the index of the indet in P (result is an unsigned type). LC(f1)  the leading coeff of f1; it is an element of CoeffRing(P). content(f1)  gcd of the coeffs of f1; it is an element of CoeffRing(P). deriv(f1, var)  formal derivative of f1 wrt. indet having index var. deriv(f1, t)  ??? IsMonomial(f);  f == coeff*pp IsConstant(f);  f == coeff IsIndet(f);  f == x[i] IsIndet(index, f);  f == x[i]; index = i NOTE: to computed the "weighted degree" of a polynomial use the function [wdeg] defined for elements of a [SparsePolyRing]. Maintainer documentation for PolyRing ===================================== The hard part has been deciding which member functions should be in [PolyRingBase] and which should be in less abstract classes. If you want to modify the code here, you should probably also look at SparsePolyRing and DUPolyRing... before messing with the code! The implementations in PolyRing.C are all very simple: they just conduct some sanity checks on the function arguments before passing them to the PolyRing member function which will actually do the work. Bugs, Shortcomings and other ideas ================================== What precisely should the "fancy" version of deriv do? What are permitted values for the second arg? Must coeff=1? What if the second arg does not have precisely one term? The range of member functions on RawValues is rather a hotchpotch. Hopefully, experience and use of the code will bring some better order to the chaos. Verify the true need for myRemoveBigContent, myMulByCoeff, myDivByCoeff. If the coeff ring has zero divisors then myMulByCoeff could change the structure of the poly! Should [content] give an error when the coeff ring is a field? Should the function [content] handle the special case of a zero argument? (result is defined to be zero) No documentation for homomorphisms.
Definition at line 79 of file PolyRing.H.

Definition at line 128 of file PolyRing.H. 

Allow const member fns to be called.
Reimplemented from CoCoA::ring. Reimplemented in CoCoA::SparsePolyRing. Definition at line 141 of file PolyRing.H. References CoCoA::ring::operator>(). 

Used by "downcasting" functions IsRingFp, AsRingFp, etc.
Definition at line 61 of file ring.H. References CoCoA::SmartPtrIRC< T >::myRawPtr(). Referenced by CoCoA::AsPolyRing(), CoCoA::AsSparsePolyRing(), CoCoA::IsPolyRing(), CoCoA::IsSparsePolyRing(), and CoCoA::operator==(). 