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

/magnus/back_end/Group/include/GroupFastChecks.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: GroupFastChecks.h,v 1.1 1996/12/09 17:29:45 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1996 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of class GroupFastChecks
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: Usable
00013 //
00014 // Usage: Should contain various fast checks applicable in BE & SM.
00015 //
00016 // Special Notes:
00017 //
00018 // Revision History:
00019 //
00020 
00021 #ifndef _GroupFastChecks_h_
00022 #define _GroupFastChecks_h_
00023 
00024 #include "FPGroup.h"
00025 
00026 
00027 // --------------------------- GroupFastChecks ------------------------------ //
00028 
00029 
00030 class GroupFastChecks {
00031 
00032 public:
00033 
00034   /////////////////////////////////////////////////////////////////////////
00035   //                                                                     //
00036   // Constructors:                                                       //
00037   //                                                                     //
00038   /////////////////////////////////////////////////////////////////////////
00039 
00040   GroupFastChecks( const FPGroup& G ) : 
00041     theGroup( G ),
00042     numOfGens( G.numberOfGenerators() ),
00043     relators( G.getRelators() )
00044   { }
00045 
00046   // Default & copy contructors, operator = provided by compiler.
00047 
00048 
00049   /////////////////////////////////////////////////////////////////////////
00050   //                                                                     //
00051   // Accessors:                                                          //
00052   //                                                                     //
00053   /////////////////////////////////////////////////////////////////////////
00054 
00055   bool hasTrivialPresentation( ) {
00056     return ( numOfGens == 0 && relators.cardinality() == 0 );
00057   }
00058   // True if the entered presentation has form < ; >.
00059 
00060 
00061   bool numOfRelsLessNumOfGens( ) { 
00062     return ( relators.cardinality() < numOfGens ); 
00063   }
00064   // True if the number of relators is less than the number of generators.
00065 
00066   bool existsGenWithExpSumZeroInEveryRelator( Generator& );
00067   // True if there's such generator exponent sum of which is equal to
00068   // zero in every relator. The generator'll be return as well.
00069 
00070   VectorOf<int> getExpSumOfGen( const Generator& g);
00071   // Return exponent sums of g in the group relators.
00072 
00073   int GCDOfExpSumOfGen( const Generator& g );
00074   // Return the GCD of exponent sums of g in the group relators.
00075 
00076 
00077 private:
00078  
00079   /////////////////////////////////////////////////////////////////////////
00080   //                                                                     //
00081   // Data Members:                                                       //
00082   //                                                                     //
00083   /////////////////////////////////////////////////////////////////////////
00084 
00085   FPGroup theGroup;     // the group to work with
00086   int numOfGens;        // number of generators of the group
00087   SetOf<Word> relators; // group relators 
00088 };
00089 
00090 
00091 #endif
00092 

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