CoCoALib-0.9905 date: 23 May 2007

CoCoA::FreeModule Class Reference

#include <FreeModule.H>

Inheritance diagram for CoCoA::FreeModule:

Inheritance graph
List of all members.

Public Member Functions

 FreeModule (const FreeModuleBase *MPtr)
 FreeModule (const module &M)
 ~FreeModule ()
const FreeModuleBasemyModulePtr () const
const FreeModuleBaseoperator-> () const
 Allow const member fns to be called.
const ModuleBasemyRawPtr () const
 Used by "downcasting" functions Is(..), As(..), etc.
bool operator== (const module &PPM) const

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 the class FreeModule

For normal use there are only three functions of interest:

  NewFreeModule(R, NumCompts)
    creates an object of type EFGModule representing the free module of
    dimension NumCompts over the ring R.

    where M is a module; if M is genuinely a FreeModule then that FreeModule
    is returned otherwise an error is generated.

    true iff the module M is genuinely a FreeModule.

  NewFreeModule(R, NumCompts, shifts)
    creates an object of type EFGModule representing the free module of
    dimension NumCompts over the ring R.  R must be a PolyRing, and
    shifts is a vector<degree> containing NumCompts elements, the i-th
    element being the shift applied to degrees of values in the i-th
    component.  For example: ?????

Maintainer documentation for the classes FreeModule and FreeModuleImpl

I shall suppose that the maintainer documentation for modules and
EFGModules has already been read and digested.  It could also be helpful
to have read ring.txt since the "design philosophy" here imitates that
used for rings.

As one would expect, FreeModule is simple a reference counting smart
pointer class to a FreeModuleImpl object.

FreeModuleImpl turns out to be a little more complex than one might
naively guess.  The extra complexity arises from two causes: one is
compatibility with the general structure of modules, and the other is
that a FreeModule manages the memory used to represent the values of
ModuleElems belonging to itself.

GradedFreeModuleImpl is derived from FreeModuleImpl and allows
storing and using ordering and shifts: it requires a SparsePolyRing
as BaseRing.  It provides these functions for FreeModule:
  FreeModule NewFreeModule(const ring& P, const ModuleTermOrdering& O);
  bool IsGradedFreeModule(const module& M);

The following functions are defined only if FreeModule is implemented as GradedFreeModuleImpl
  const std::vector<degree>& shifts(const FreeModule& M);
  const ModuleTermOrdering& ordering(const FreeModule& M);
  std::size_t LPos(const ModuleElem& v);
  degree wdeg(const ModuleElem& v);
  int CmpWDeg(const ModuleElem& v1, const ModuleElem& v2);
  ConstRefPPMonoidElem LPP(const ModuleElem& v);
  bool IsHomogeneous(const ModuleElem& v);

Bugs, Shortcomings and other ideas

Documentation rather incomplete.

Definition at line 45 of file FreeModule.H.

Constructor & Destructor Documentation

CoCoA::FreeModule::FreeModule const FreeModuleBase MPtr  )  [explicit]

CoCoA::FreeModule::FreeModule const module M  )  [explicit]

CoCoA::FreeModule::~FreeModule  ) 

Member Function Documentation

const FreeModuleBase* CoCoA::FreeModule::myModulePtr  )  const

Reimplemented from CoCoA::EFGModule.

const FreeModuleBase * CoCoA::FreeModule::operator->  )  const [inline]

Allow const member fns to be called.

Reimplemented from CoCoA::EFGModule.

Definition at line 68 of file FreeModule.H.

References CoCoA::module::myRawPtr().

const ModuleBase* CoCoA::module::myRawPtr  )  const [inline, inherited]

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

Definition at line 55 of file module.H.

References CoCoA::SmartPtrIRC< T >::myRawPtr().

Referenced by CoCoA::AsEFGModule(), CoCoA::IsEFGModule(), CoCoA::EFGModule::myModulePtr(), operator->(), and CoCoA::EFGModule::operator->().

bool CoCoA::module::operator== const module PPM  )  const [inline, inherited]

Definition at line 56 of file module.H.

References CoCoA::PPMonoid::mySmartPtr, and CoCoA::PPM().

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