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

/magnus/back_end/SMApps/include/IsTrivialProblem.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: IsTrivialProblem.h,v 1.5 1998/08/03 20:24:12 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: Declaration of classes IsTrivialChecker, IsTrivialProblem
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 
00018 #ifndef _IS_TRIVIAL_PROBLEM_H_
00019 #define _IS_TRIVIAL_PROBLEM_H_
00020 
00021 
00022 #include "Supervisor.h"
00023 #include "FEData.h"
00024 #include "Word.h"
00025 #include "FPGroup.h"
00026 #include "Chars.h"
00027 #include "GroupFastChecks.h"
00028 #include "NilpotentQuotients.h"
00029 #include "GeneticProblems.h"
00030 
00031 
00032 // ------------------------ IsTrivialChecker ------------------------------- //
00033 
00034 
00035 // This separates out the GIC-sniffing smarts needed to check a word for
00036 // triviality.
00037 
00038 class IsTrivialChecker
00039 {
00040 public:
00041 
00042   IsTrivialChecker( class SMFPGroup& );
00043 
00044   Trichotomy isTrivial( );
00045 
00046   Chars getExplanation( ) { return explanation; }
00047 
00048   Chars getDetailsFileName( ) const;
00049 
00050   bool haveDetails( ) const;
00051 
00052 private:
00053 
00054   class SMFPGroup& theGroup;
00055 
00056   FPGroup G;
00057 
00058   GroupFastChecks checker;
00059     
00060   class GIC& gic;
00061 
00062   class GCM& gcm;
00063 
00064 
00065   // Housekeeping members:
00066 
00067   bool triedAbelianization;
00068 
00069   bool triedPreliminaryCheckings;
00070 
00071   Chars explanation;
00072 
00073   DetailedReport trivialDetails; 
00074 
00075   // Private functions:
00076 
00077   Trichotomy preliminaryCheckings();
00078 };
00079 
00080 
00081 // ----------------------- IsTrivialProblem -------------------------------- //
00082 
00083 
00084 class IsTrivialProblem : public Supervisor
00085 {
00086 public:
00087 
00088   /////////////////////////////////////////////////////////////////////////
00089   //                                                                     //
00090   // Constructors:                                                       //
00091   //                                                                     //
00092   /////////////////////////////////////////////////////////////////////////
00093 
00094   IsTrivialProblem( class SMFPGroup& );
00095 
00096   /////////////////////////////////////////////////////////////////////////
00097   //                                                                     //
00098   // Accessors:                                                          //
00099   //                                                                     //
00100   /////////////////////////////////////////////////////////////////////////
00101 
00102   Trichotomy answer( ) const { return theAnswer; }
00103   // When a WordProblem is used internally, it does not report the result
00104   // to the FE, but just sits and waits to be polled through this member.
00105   // yes => trivial, no => not trivial, dontknow => not done yet.
00106 
00107   /////////////////////////////////////////////////////////////////////////
00108   //                                                                     //
00109   // Front End Interfacing:                                              //
00110   //                                                                     //
00111   /////////////////////////////////////////////////////////////////////////
00112 
00113   void viewStructure(ostream& ostr) const;  // overrides SMObject
00114 
00115   /////////////////////////////////////////////////////////////////////////
00116   //                                                                     //
00117   // Control:                                                            //
00118   //                                                                     //
00119   /////////////////////////////////////////////////////////////////////////
00120 
00121   void takeControl( );         // overrides ComputationManager
00122 
00123   /////////////////////////////////////////////////////////////////////////
00124   //                                                                     //
00125   // State Transitions:                                                  //
00126   //                                                                     //
00127   /////////////////////////////////////////////////////////////////////////
00128 
00129   void start( );              // overrides ComputationManager
00130 
00131   void terminate( );          // overrides ComputationManager
00132 
00133 
00134 private:
00135 
00136   /////////////////////////////////////////////////////////////////////////
00137   //                                                                     //
00138   // Data Members:                                                       //
00139   //                                                                     //
00140   /////////////////////////////////////////////////////////////////////////
00141 
00142   const SMFPGroup& theGroup;
00143 
00144   IsTrivialChecker theChecker;
00145 
00146 
00147   // Housekeeping members:
00148 
00149   Trichotomy theAnswer;
00150 
00151   Chars explanation;
00152 
00153 
00154   // GCM components this uses; only for automatic ARC passing:
00155 
00156   MirrorSubordinate normalClosure;
00157 
00158   MirrorSubordinate abelianInvariants;
00159 
00160   MirrorSubordinate kbSupervisor;
00161 
00162   MirrorSubordinate agSupervisor;
00163 
00164   MirrorSubordinate nilpotentQuotients;
00165 
00166   Subordinate<IsTrivialProblem,NilpotentWPInQuotients> nilpotentWPInQuotients;
00167 
00168   Subordinate<IsTrivialProblem, GeneticWPCM> genetic;
00169 };
00170 
00171 
00172 //
00173 //  Class IsTrivialChecker -- inline functions
00174 //
00175 
00176 inline
00177 Chars IsTrivialChecker::getDetailsFileName( ) const 
00178 { 
00179   return trivialDetails.getFileName(); 
00180 }
00181 
00182 inline
00183 bool IsTrivialChecker::haveDetails( ) const
00184 {
00185   trivialDetails.haveDetails( );
00186 }
00187 
00188 #endif

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