Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/Group/include/Products.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: 
00003  */
00004 
00005 // Copyright (C) 1998 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of the FreeProduct class.
00009 //
00010 // Principal Authors: Alexei Myasnikov
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 // Special Notes:
00017 //           This classes are constructors. The only purpose is to 
00018 //   recieve two groups and return a product (FPGroup) and corresponding maps.
00019 //
00020 
00021 #ifndef _PRODUCTS_H_
00022 #define _PRODUCTS_H_
00023 
00024 #include "FPGroup.h"
00025 #include "Map.h"
00026 
00027 class FreeProduct
00028 {
00029 public:
00030   enum CreatError { NONE, DOUBLE_GENS };
00031   FreeProduct( const FPGroup& g1, const FPGroup& g2): 
00032     theStatus( NONE ),
00033     G1( g1 ),
00034     G2( g2 ),
00035     gensInitialized( false )
00036     {
00037       createGenerators();
00038       createRelators();
00039     }
00040 
00041   // Maps
00042   virtual Map mapFromG1() const;
00043   virtual Map mapFromG2() const;
00044   virtual Map mapToG1() const;
00045   virtual Map mapToG2() const;
00046   
00047   //  CreateError getCreateStatus() const { return theStatus; }
00048 
00049   operator FPGroup( ) const { return FPGroup(theGenerators, theRelators);}
00050 
00051 protected:
00052   void createGenerators();
00053   void createRelators();
00054 
00055   VectorOf<Chars> theGenerators;
00056   SetOf<Word> theRelators;
00057 
00058   FPGroup G1;
00059   FPGroup G2;
00060 
00061   // Creation status
00062   CreatError theStatus;
00063 private:
00064   FreeProduct( const FreeProduct&);
00065   FreeProduct& operator = ( const FreeProduct& );
00066   bool gensInitialized;
00067 };
00068 
00069 
00070 class DirectProduct : public FreeProduct
00071 {
00072  public:
00073    DirectProduct( const FPGroup& g1, const FPGroup& g2);
00074          
00075  private:
00076   DirectProduct( const DirectProduct&);
00077   DirectProduct& operator = ( const DirectProduct& );
00078 };
00079 #endif
00080 

Generated at Tue Jun 19 09:49:36 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001