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

/magnus/back_end/Group/include/FGGroupRep.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: FGGroupRep.h,v 1.5 2000/03/03 02:44:10 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 FGGroupRep class.
00009 //           The name is abbreviated to fit in a library.
00010 //
00011 // Principal Authors: Stephane Collart, Roger Needham
00012 //
00013 // Status: in progress
00014 //
00015 // Revision History:
00016 //
00017 // Special Notes:
00018 //
00019 
00020 #ifndef _FIN_GEN_GROUP_REP_H_
00021 #define _FIN_GEN_GROUP_REP_H_
00022 
00023 #include "Chars.h"
00024 #include "Vector.h"
00025 #include "Word.h"
00026 #include "GroupRep.h"
00027 
00028 
00029 struct FGGroupRep : GroupRep {
00030   
00031 public:
00032 
00033 // Constructors:
00034 
00035   // No default constructor
00036   // Copy constructor provided by compiler (does deep copy).
00037   
00038   FGGroupRep( int ngens ) :
00039     theNumberOfGenerators(ngens),
00040     theNamesOfGenerators(0) { }
00041   // to construct a group with ngens nameless generators
00042   
00043   FGGroupRep( const VectorOf<Chars>& gennames ) :
00044     theNumberOfGenerators(gennames.length()),
00045     theNamesOfGenerators(gennames) { }
00046   // to construct a group with named generators
00047   
00048   // Destructor provided by compiler.
00049 
00050 // operators:
00051 
00052   // disable assignment:
00053   private: FGGroupRep& operator = ( const FGGroupRep& );
00054   public:
00055   
00056 // representation methods:
00057 
00058   // Inherited from GroupRep:
00059   // virtual PureRep* clone( );
00060   // No need for clone( ) in derived abstract representation.
00061 
00062   static const Type theFGGroupType;
00063 
00064   static Type type( ) { return theFGGroupType; }
00065 
00066   Type actualType( ) const { return type(); }
00067   // overrides GroupRep::actualType();
00068 
00069 // Methods dealing with group structure:
00070 
00071   // Inherited from GroupRep:
00072   // virtual int order( ) const = 0;
00073   // virtual Trichotomy isTrivial( ) const = 0;
00074   // virtual Trichotomy isFinite( ) const = 0;
00075   // virtual Trichotomy isInfinite( ) const = 0;
00076   // virtual Trichotomy isAbelian( ) const = 0;
00077 
00078   bool compare( const GroupRep* G ) const;
00079 
00080 // Methods dealing with group elements:
00081   
00082   Elt makeIdentity( ) const { return Word(); }
00083   // overrides GroupRep::...
00084 
00085   Bool isSyntacticIdentity( const Elt& e) const;
00086   // overrides GroupRep::...
00087 
00088   // Inherited from GroupRep:
00089   // virtual Trichotomy isTrivialElt( const Elt& e ) const;
00090   // virtual Trichotomy areEqual(const Elt&, const Elt&) const = 0;
00091 
00092   Elt firstElt( ) const { return Word(); }
00093   // overrides GroupRep::...
00094 
00095   Elt nextElt( const Elt& e ) const;
00096   // overrides GroupRep::...
00097 
00098   Elt multiply( const Elt& e1, const Elt& e2 ) const;
00099   // overrides GroupRep::...
00100 
00101   Elt inverseOf( const Elt& e ) const;
00102   // overrides GroupRep::...
00103 
00104   // Inherited from GroupRep:
00105   // virtual Elt raiseToPower(const Elt&, int) const;
00106   // virtual Elt conjugateBy(const Elt&, const Elt&) const;
00107   // virtual Elt commutator(const Elt&, const Elt&) const;
00108 
00109   virtual Elt eval( const Word& w ) const = 0;
00110 
00111   virtual Trichotomy wordProblem( const Word& w ) const = 0;
00112 
00113   virtual Trichotomy conjugacyProblem( const Word& u, const Word& v ) const = 0;
00114 
00115 // I/O:
00116 
00117   // Inherited from GroupRep:
00118   // virtual void printOn(ostream&) const = 0;
00119   // virtual GroupRep* readFrom(istream&, Chars&) const = 0;
00120 
00121   virtual void printGenerator( ostream& ostr, int n ) const;
00122 
00123   virtual void printGenerators( ostream& ostr ) const;
00124 
00125   virtual void printWord( ostream& ostr, const Word& w ) const;
00126 
00127   virtual void printSetOfWords( ostream& ostr, const SetOf<Word>& S ) const;
00128 
00129   virtual void printVectorOfWords( ostream& ostr, const VectorOf<Word>& V,
00130                     char* leftBracket = "{", char* rightBracket = "}" ) const;
00131 
00132   /////////////////////////////////////////////////////////////////////////
00133   //                                                                     //
00134   // IPC tools:                                                          //
00135   //                                                                     //
00136   /////////////////////////////////////////////////////////////////////////
00137 
00138   void write( ostream& ostr ) const ; 
00139  
00140   void read( istream& istr ) ;
00141 
00142 
00143 //@rn private:
00144 
00145 // Data members:
00146  
00147   // Inherited from GroupRep:
00148   // int theOrder;
00149   
00150   int theNumberOfGenerators;
00151   
00152   VectorOf<Chars> theNamesOfGenerators;
00153   
00154 // Debugging stuff:
00155 
00156 //#ifdef DEBUG
00157 
00158   bool consistent( ) const {
00159     return theNumberOfGenerators == theNamesOfGenerators.length();
00160   } // overrides bool GroupRep::consistent() const;
00161 
00162 //#endif
00163 
00164 };
00165 
00166 #endif

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