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

/magnus/back_end/Group/include/GroupRep.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: GroupRep.h,v 1.4 2000/03/03 02:44:15 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1994 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of the GroupRep class.
00009 //
00010 // Principal Authors: Stephane Collart, Roger Needham
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 // * 07/96 Alexey M. implemented IPC tools.
00017 
00018 #ifndef _GROUP_REP_H_
00019 #define _GROUP_REP_H_
00020 
00021 
00022 #include "GenericObject.h"
00023 #include "Type.h"
00024 #include "Chars.h"
00025 #include "Elt.h"
00026 #include "Set.h"
00027 #include "IPC.h"
00028 #include "ExtendedIPC.h"
00029 
00030 struct GroupRep : GenericRep {
00031   
00032 public:
00033 
00034 // Constructors:
00035 
00036   GroupRep( ) : theOrder(-1) { }
00037   
00038   // compiler provides copy constructor (does "deep copy")
00039   // no need for destructor to do anything
00040   
00041 // Representation methods:
00042 
00043   // Inherited from PureRep:
00044   // virtual PureRep* clone( ) = 0;
00045 
00046   static const Type theGroupType;
00047 
00048   static Type type( ) { return theGroupType; }
00049 
00050   virtual Type actualType( ) const { return type(); }
00051 
00052 // Operators:
00053 
00054   private: GroupRep& operator = ( const GroupRep& );
00055   // disable assignement
00056   public:
00057 
00058 // Methods dealing with group structure:
00059 
00060   virtual bool compare( const GroupRep* G ) const = 0;
00061 
00062   virtual int order( ) const = 0;
00063   virtual Trichotomy isTrivial( ) const = 0;
00064   virtual Trichotomy isFinite( ) const = 0;
00065   virtual Trichotomy isInfinite( ) const = 0;
00066   virtual Trichotomy isAbelian( ) const = 0;
00067   
00068 // Methods dealing with group elements:
00069 
00070   virtual Elt makeIdentity( ) const = 0;
00071   virtual Bool isSyntacticIdentity(const Elt&) const = 0;
00072   virtual Trichotomy isTrivialElt( const Elt& e ) const { return DONTKNOW; }
00073   virtual Trichotomy areEqual(const Elt&, const Elt&) const = 0;
00074   virtual Elt firstElt( ) const = 0;
00075   virtual Elt nextElt(const Elt&) const = 0;
00076 
00077   virtual Elt multiply(const Elt&, const Elt&) const = 0;
00078   virtual Elt inverseOf(const Elt&) const = 0;
00079 
00080   virtual Elt raiseToPower(const Elt&, int) const;
00081   virtual Elt conjugateBy(const Elt&, const Elt&) const;
00082   virtual Elt commutator(const Elt&, const Elt&) const;
00083 
00084 // I/O:
00085 
00086   virtual void printOn(ostream&) const = 0;
00087   virtual GroupRep* readFrom(istream&, Chars&) const = 0;
00088 
00089   /////////////////////////////////////////////////////////////////////////
00090   //                                                                     //
00091   // IPC tools:                                                          //
00092   //                                                                     //
00093   /////////////////////////////////////////////////////////////////////////
00094 
00095   virtual void write( ostream& ostr ) const { ostr < theOrder; }
00096  
00097   virtual void read( istream& istr ) { istr >theOrder;}
00098  
00099 
00100 // Data members:
00101 
00102   int theOrder;
00103   //@rn We kludgily use -1 to record dontknow.
00104 
00105   //@rn where/how to store info a group discovers about itself needs
00106   //    more thought.
00107 
00108 // Debugging stuff:
00109 
00110 #ifdef DEBUG
00111 
00112   virtual bool consistent( ) const { return true; }
00113   // this performs a simple consistency check on the internal data of
00114   // group representation
00115   // return true = no error detected
00116   // return false = inconsistency found
00117 
00118 #endif
00119 };
00120 
00121 #endif

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