CoCoALib-0.9905 date: 23 May 2007


CoCoA::PolyRing Class Reference

#include <PolyRing.H>

Inheritance diagram for CoCoA::PolyRing:

Inheritance graph
[legend]
Collaboration diagram for CoCoA::PolyRing:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PolyRing (const PolyRingBase *RingPtr)
const PolyRingBaseoperator-> () const
 Allow const member fns to be called.
const RingBasemyRawPtr () const
 Used by "downcasting" functions IsRingFp, AsRingFp, etc.

Private Member Functions

PolyRingoperator= (const PolyRing &rhs)

Detailed Description

      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 Front-Cover Texts, and no Back-Cover 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[NumIndets-1], 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 i-th
                       element is the i-th indeterminate in P.
  indet(P,i)        -- the i-th indet of P as a RingElem.
  IndetPower(P,i,n) -- the n-th power of the i-th 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 non-const 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 hotch-potch.
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.


Constructor & Destructor Documentation

CoCoA::PolyRing::PolyRing const PolyRingBase RingPtr  )  [inline, explicit]
 

Definition at line 128 of file PolyRing.H.


Member Function Documentation

PolyRing& CoCoA::PolyRing::operator= const PolyRing rhs  )  [private]
 

const PolyRingBase * CoCoA::PolyRing::operator->  )  const [inline]
 

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->().

const RingBase* CoCoA::ring::myRawPtr  )  const [inline, inherited]
 

Used by "downcasting" functions IsRingFp, AsRingFp, etc.

Definition at line 61 of file ring.H.

References CoCoA::SmartPtrIRC< T >::myRawPtr(), and CoCoA::ring::mySmartPtr.

Referenced by CoCoA::AsPolyRing(), CoCoA::AsSparsePolyRing(), CoCoA::IsPolyRing(), CoCoA::IsSparsePolyRing(), and CoCoA::operator==().


The documentation for this class was generated from the following file:
Generated on Wed May 23 13:44:37 2007 for CoCoALib by  doxygen 1.4.6