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

/magnus/back_end/AProducts/include/ORProblems.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: ORProblems.h,v 1.1 1997/05/15 20:09:56 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1995 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of class ORProblems
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: provisional implementation
00013 //
00014 // Usage: 
00015 //
00016 // Special Notes:
00017 //
00018 //   All this functions should be in the class OneRelatorGroup, 
00019 //   but we still don't have it. 
00020 //
00021 // Revision History:
00022 //
00023 
00024 #ifndef _OR_PROBLEMS_H_
00025 #define _OR_PROBLEMS_H_
00026 
00027 #include "FPGroup.h"
00028 
00029 
00030 // ---------------------------- ORProblems --------------------------------- //
00031 
00032 
00033 class ORProblems {
00034 
00035 public:
00036 
00037   /////////////////////////////////////////////////////////////////////////
00038   //                                                                     //
00039   // Constructors:                                                       //
00040   //                                                                     //
00041   /////////////////////////////////////////////////////////////////////////
00042 
00043   ORProblems( int numOfGens, const Word& relator ) 
00044     : numberOfGenerators( numOfGens ), 
00045       theRelator( relator )
00046   { }
00047   
00048 
00049   /////////////////////////////////////////////////////////////////////////
00050   //                                                                     //
00051   // Accessors:                                                          //
00052   //                                                                     //
00053   /////////////////////////////////////////////////////////////////////////
00054 
00055   bool isTrivial( ) const;
00056 
00057   bool isAbelian( ) const;
00058 
00059   bool isFinite( ) const;
00060 
00061   bool isFree( ) const;
00062 
00063   int order( ) const;
00064 
00065   
00066 private:
00067  
00068   /////////////////////////////////////////////////////////////////////////
00069   //                                                                     //
00070   // Data Members:                                                       //
00071   //                                                                     //
00072   /////////////////////////////////////////////////////////////////////////
00073 
00074   int numberOfGenerators;
00075 
00076   Word theRelator;
00077 
00078 };
00079 
00080 
00081 inline bool ORProblems::isFinite( ) const
00082 {
00083   return numberOfGenerators == 1;
00084 }
00085 
00086 
00087 inline int ORProblems::order( ) const
00088 {
00089   if( isFinite() )
00090     return theRelator.length();
00091   else
00092     return 0;
00093 }
00094 
00095 #endif
00096 

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