CoCoALib-0.9905 date: 23 May 2007


CoCoA::ModuleTermOrdering Class Reference

#include <ModuleTermOrdering.H>

Collaboration diagram for CoCoA::ModuleTermOrdering:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleTermOrdering (const ModuleTermOrderingBase *ptr)
const ModuleTermOrderingBaseoperator-> () const
 Allow const member fns to be called.
const ModuleTermOrderingBasemyRawPtr () const
 Used by "downcasting" functions Is(..), As(...) etc.
bool operator== (const ModuleTermOrdering &MTO) const

Private Attributes

SmartPtrIRC< const ModuleTermOrderingBasemySmartPtr

Detailed Description

      Copyright (c)  2005 Anna Bigatti
      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 ModuleTermOrdering ==

An object of the class ModuleTermOrdering represents an ordering on
the module monoid of module terms, i.e. such that the
ordering respects the operation ....  
In CoCoALib orderings and gradings are intimately linked (for gradings
see also degree.txt and PPOrdering.txt).

Currently, the most typical use for a ModuleTermOrdering object is as
a constructor argument to a concrete FreeModule (see file
FreeModule.txt).  At the moment there are ? functions which create
new ModuleTermOrderings:

Pseudo-constructors: (where PPO is a PPOrdering, shifts is a
vector<degree>, perm is vector<size_t>, NumComponents is a size_t)
  NewWDegTOPos(PPO, NumComponents);
  NewPosWDegTO(PPO, NumComponents);
  NewWDegPosTO(PPO, NumComponents);
  NewWDegTOPos(PPO, shifts);
  NewWDegPosTO(PPO, shifts);
  NewPosWDegTO(PPO, shifts);
  NewWDegTOPos(PPO, perm);
  NewWDegPosTO(PPO, perm);
  NewWDegTOPos(PPO, shifts, perm);
  NewWDegPosTO(PPO, shifts, perm);
where 
  WDeg is the degree (incl. the shifts)
  TO   is the PPOrdering (incl. the degree, i.e. the first GrDim rows)
  Pos  is the position (according to the "score" given by perm [NYI])

=== Example ===
  P = Q[x,y] with StdDegLex (==> GradingDim = 1)
  P(-2) (+) P(-1)  i.e. P^2 with shifts = [(2), (1)], and WDegTOPos
  v1 = [x,0],   v2 = [0,y^2]:
  WDeg(v1) = WDeg(x)+2 = 3,  WDeg(v2) = WDeg(y^2)+1 = 3
  x < y^2 according to StdDegLex  (NB: not "Lex"!)
  so v1 < v2


The operations on a ModuleTermOrdering object are:
  out << MTO;      // output the MTO object to channel out
  const std::vector<degree>& shifts(const ModuleTermOrdering& O);
  std::size_t NumComponents(const ModuleTermOrdering& MTO);
  std::size_t GradingDim(const ModuleTermOrdering& MTO);
  const PPOrdering& ModPPOrdering(const ModuleTermOrdering& MTO);

  bool IsWDegTOPos(const ModuleTermOrdering& MTO);// true iff MTO is implemented as WDegTOPos
  bool IsPosWDegTO(const ModuleTermOrdering& MTO);
  bool IsWDegPosTO(const ModuleTermOrdering& MTO);


output and OpenMath output is still questionable.


== Maintainer documentation for ModuleTermOrdering ==

The general ideas behind the implementations of ModuleTermOrdering and
ModuleTermOrderingBase are analogous to those used for ring and RingBase.
ModuleTermOrdering is a simple reference counting smart-pointer class, while
ModuleTermOrderingBase hosts the intrusive reference count (so that
every concrete derived class will inherit it).  [See SmartPtrIRC.txt]

The only remaining observation to make about the simple class
ModuleTermOrdering is that I have chosen to disable assignment -- I
find it hard to imagine when it could be useful to be able to assign
ModuleTermOrderings, and suspect that allowing assignment is more
likely to lead to confusion and poor programming style.

There are ? concrete ModuleTermOrderings in the namespace CoCoA::MTO.  The
implementations are all simple and straightforward except for the matrix
ordering which is a little longer and messier but still easy enough to
follow.

See also the CoCoAReport "Free Modules".

== Bugs, shortcomings and other ideas ==

=== do we need a class "shifts"? ===

Definition at line 46 of file ModuleTermOrdering.H.


Constructor & Destructor Documentation

CoCoA::ModuleTermOrdering::ModuleTermOrdering const ModuleTermOrderingBase ptr  )  [inline, explicit]
 

Definition at line 49 of file ModuleTermOrdering.H.


Member Function Documentation

const ModuleTermOrderingBase* CoCoA::ModuleTermOrdering::operator->  )  const [inline]
 

Allow const member fns to be called.

Definition at line 51 of file ModuleTermOrdering.H.

References mySmartPtr.

const ModuleTermOrderingBase* CoCoA::ModuleTermOrdering::myRawPtr  )  const [inline]
 

Used by "downcasting" functions Is(..), As(...) etc.

Definition at line 52 of file ModuleTermOrdering.H.

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

bool CoCoA::ModuleTermOrdering::operator== const ModuleTermOrdering MTO  )  const [inline]
 

Definition at line 53 of file ModuleTermOrdering.H.

References mySmartPtr.


Member Data Documentation

SmartPtrIRC<const ModuleTermOrderingBase> CoCoA::ModuleTermOrdering::mySmartPtr [private]
 

Definition at line 55 of file ModuleTermOrdering.H.

Referenced by myRawPtr(), operator->(), and operator==().


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