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

/magnus/back_end/SessionManager/include/SMEquation.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: SMEquation.h,v 1.7 2000/03/22 21:55: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: Declaration of class SMEquation
00009 //
00010 // Principal Author: Roger Needham
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _SMEQUATION_H_
00018 #define _SMEQUATION_H_
00019 
00020 #include "AlgebraicObject.h"
00021 #include "SMFPGroup.h"
00022 #include "Word.h"
00023 #include "QEqnSolutions.h"
00024 #include "BaseProperties.h"
00025 #include "InformationCenter.h"
00026 
00027 class AllBasicSolutionsProperty : public NoDataProperty {
00028 public:
00029   AllBasicSolutionsProperty() : NoDataProperty() {}
00030   PropertyType actualType()   const { return type(); }
00031   static PropertyType type() { return theTypeID; }
00032   Chars propertyName() const { return "AllBasicSolutions"; }
00033 protected:
00034   GenericProperty* clone() const { 
00035     return new AllBasicSolutionsProperty(*this); 
00036   }
00037 private:
00038   static const PropertyType theTypeID;
00039 };
00040 
00041 class AllRegStabGeneratorsProperty : public NoDataProperty {
00042 public:
00043   AllRegStabGeneratorsProperty() : NoDataProperty() {}
00044   PropertyType actualType()   const { return type(); }
00045   static PropertyType type() { return theTypeID; }
00046   Chars propertyName() const { return "AllRegStabGenerators"; }
00047 protected:
00048   GenericProperty* clone() const { 
00049     return new AllRegStabGeneratorsProperty(*this); 
00050   }
00051 private:
00052   static const PropertyType theTypeID;
00053 };
00054 
00055 class BasicSolutionsProperty : public ListOfEndomorphismProperty {
00056 public:
00057   BasicSolutionsProperty(const ListOf<Endomorphism>& data, 
00058                          const Chars& descr = "" )
00059     : ListOfEndomorphismProperty(data, descr) {}
00060   PropertyType actualType()   const { return type(); }
00061   static PropertyType type() { return theTypeID; }
00062   Chars propertyName() const { return "BasicSolutions"; }
00063 protected:
00064   GenericProperty* clone() const { return new BasicSolutionsProperty(*this); }
00065 private:
00066   static const PropertyType theTypeID;
00067 };
00068 
00069 class RegStabGeneratorsProperty : public ListOfAutomorphismProperty {
00070 public:
00071   RegStabGeneratorsProperty(const ListOf<Automorphism>& data, 
00072                             const Chars& descr = "" ) 
00073     : ListOfAutomorphismProperty(data, descr) {}
00074   PropertyType actualType()   const { return type(); }
00075   static PropertyType type() { return theTypeID; }
00076   Chars propertyName() const { return "RegStabGenerators"; }
00077 protected:
00078   GenericProperty* clone() const { 
00079     return new RegStabGeneratorsProperty(*this); 
00080   }
00081 private:
00082   static const PropertyType theTypeID;
00083 };
00084 
00085 //---------------------------------------------------------------------------//
00086 //------------------------------- EIC ---------------------------------------//
00087 //---------------------------------------------------------------------------//
00088 
00089 class EIC : public InformationCenter, protected FEData
00090 {
00091 public:
00092   /////////////////////////////////////////////////////////////////////////
00093   //                                                                     //
00094   // Constructors:                                                       //
00095   //                                                                     //
00096   /////////////////////////////////////////////////////////////////////////
00097   
00098   EIC(OID group_oid);
00099 
00100   ~EIC( );
00101 
00102   /////////////////////////////////////////////////////////////////////////
00103   //                                                                     //
00104   // Reporting Information:                                              //
00105   //                                                                     //
00106   /////////////////////////////////////////////////////////////////////////
00107 
00108   void putHaveAllBasicSolutions( bool found );
00109 
00110   void putHaveAllRegStabGenerators( bool found );
00111 
00112   void addBasicSolutions( const ListOf<Endomorphism>& basicSolutions );
00113   void addRegStabGenerators( const ListOf<Automorphism>& regStabGens );
00114 
00115   void putIsSolvedInAbelianization() {
00116     solvedInAbelian = yes;
00117   }
00118   
00119   void putHaveSolutionsInAbelianization( bool sol ) { 
00120     haveSolInAbelian = sol; 
00121   }  
00122   // void clearBasicSolutions( );
00123   // void clearRegStabGenerators( );
00124 
00125   /////////////////////////////////////////////////////////////////////////
00126   //                                                                     //
00127   // Accessing Information:                                              //
00128   //                                                                     //
00129   /////////////////////////////////////////////////////////////////////////
00130 
00131   bool isSolved() const { 
00132     return haveAllBasicSolutions() && haveAllRegStabGenerators(); 
00133   }
00134 
00135   bool haveAllBasicSolutions( ) const;
00136 
00137   bool haveAllRegStabGenerators( ) const;
00138 
00139   Trichotomy haveBasicSolutions() const;
00140 
00141   bool isSolvedInAbelianization() const { 
00142     return solvedInAbelian; 
00143   }
00144   
00145   bool haveSolutionsInAbelianization( ) const { 
00146     return haveSolInAbelian; 
00147   }
00148 
00149   ListOf<Endomorphism> getBasicSolutions( ) const;
00150 
00151   Trichotomy haveRegStabGenerators() const;
00152   
00153   ListOf<Automorphism> getRegStabGenerators( ) const;
00154 
00155 private:
00156 
00157   EIC(const EIC&); // Disable copying
00158 
00159   
00160   /////////////////////////////////////////////////////////////////////////
00161   //                                                                     //
00162   // Data Members:                                                       //
00163   //                                                                     //
00164   /////////////////////////////////////////////////////////////////////////
00165 
00166   OID equationOID;
00167   // Need this for composing messages about what has been found.
00168 
00169   ListOf<Endomorphism> theBasicSolutions; // known basic solutions.
00170   ListOf<Automorphism> theRegStabGenerators; // known generators of RegStab.
00171 
00172   bool foundAllBasicSolutions;
00173   bool foundAllRegStabGenerators;
00174   
00175   bool solvedInAbelian;
00176   bool haveSolInAbelian;
00177 };
00178 
00179 //---------------------------------------------------------------------------//
00180 //-------------------------- SMEquation -------------------------------------//
00181 //---------------------------------------------------------------------------//
00182 
00183 class SMEquation : public AlgebraicObject
00184 {
00185 public:
00186 
00187   /////////////////////////////////////////////////////////////////////////
00188   //                                                                     //
00189   // Constructors:                                                       //
00190   //                                                                     //
00191   /////////////////////////////////////////////////////////////////////////
00192 
00193   SMEquation( SMFPGroup& G, FreeGroup F, const Word w, int nvar, 
00194               const Chars heritage);
00195 
00196   SMEquation(SMFPGroup& G) : AlgebraicObject(""), theGroup(G), eic( oid() ) { }
00197   //@rn Bogus ctor; see `But no' comment in Menu.h.
00198 
00199   /////////////////////////////////////////////////////////////////////////
00200   //                                                                     //
00201   // Accessors:                                                          //
00202   //                                                                     //
00203   /////////////////////////////////////////////////////////////////////////
00204 
00205   Word getWord( ) const { return theWord; };
00206 
00207   SMFPGroup& getParent( ) const { return theGroup; };
00208 
00209   const FreeGroup& getFreeGroup( ) const { return theFreeGroup; };
00210 
00211   int numberOfVariables( ) const { return numOfVar; };
00212 
00213         InformationCenter* infoCenter()       { return &eic; }
00214   const InformationCenter* infoCenter() const { return &eic; }
00215 
00216   /////////////////////////////////////////////////////////////////////////
00217   //                                                                     //
00218   // Front End Interfacing:                                              //
00219   //                                                                     //
00220   /////////////////////////////////////////////////////////////////////////
00221 
00222   static const char* type( ) { return "SMEquation"; };
00223 
00224   const char* typeID( ) const { return type(); };        // overrides SMObject
00225 
00226   const IconID iconID( ) const { return IconID::equation; };
00227   // overrides SMObject
00228 
00229   void viewStructure(ostream& ostr) const;              // overrides SMObject
00230 
00231   void printProperties(ostream& ostr) const;            // overrides SMObject
00232 
00233   void printDefinition(ostream& ostr) const;            // overrides SMObject
00234 
00235 
00236 public:
00237 
00238   EIC eic; 
00239   // equation information center.
00240 
00241 protected:
00242 
00243   /////////////////////////////////////////////////////////////////////////
00244   //                                                                     //
00245   // Restricted Access:                                                  //
00246   //                                                                     //
00247   /////////////////////////////////////////////////////////////////////////
00248 
00249   void readMessage(istream&) { };                     // overrides SMObject
00250 
00251 
00252 private:
00253 
00254   /////////////////////////////////////////////////////////////////////////
00255   //                                                                     //
00256   // Data Members:                                                       //
00257   //                                                                     //
00258   /////////////////////////////////////////////////////////////////////////
00259 
00260   SMFPGroup& theGroup;
00261   // The group that this equation is over.
00262 
00263   FreeGroup theFreeGroup;
00264   // The free group generated by theGroup's generators, along with the
00265   // variables.
00266 
00267   Word theWord;
00268   // A Word in theFreeGroup, represents the equation.
00269 
00270   int numOfVar;
00271   // a number of variables
00272 
00273 };
00274 
00275 
00276 //@db temporary class SMEquation2
00277 
00278 
00279 //---------------------------------------------------------------------------//
00280 //------------------------- SMEquation2 -------------------------------------//
00281 //---------------------------------------------------------------------------//
00282 
00283 class SMEquation2 : public AlgebraicObject
00284 {
00285 public:
00286 
00287   /////////////////////////////////////////////////////////////////////////
00288   //                                                                     //
00289   // Constructors:                                                       //
00290   //                                                                     //
00291   /////////////////////////////////////////////////////////////////////////
00292 
00293   SMEquation2( SMFPGroup& G, FreeGroup F, const Word w, int nvar, 
00294                const Chars heritage);
00295 
00296   SMEquation2(SMFPGroup& G) : AlgebraicObject(""), theGroup(G), eic( oid() ) { }
00297   //@rn Bogus ctor; see `But no' comment in Menu.h.
00298   
00299   /////////////////////////////////////////////////////////////////////////
00300   //                                                                     //
00301   // Accessors:                                                          //
00302   //                                                                     //
00303   /////////////////////////////////////////////////////////////////////////
00304 
00305   Word getWord( ) const { return theWord; };
00306 
00307   SMFPGroup& getParent( ) const { return theGroup; };
00308 
00309   const FreeGroup& getFreeGroup( ) const { return theFreeGroup; };
00310 
00311   int numberOfVariables( ) const { return numOfVar; };
00312 
00313   /////////////////////////////////////////////////////////////////////////
00314   //                                                                     //
00315   // Front End Interfacing:                                              //
00316   //                                                                     //
00317   /////////////////////////////////////////////////////////////////////////
00318 
00319   static const char* type( ) { return "SMEquation2"; };
00320 
00321   const char* typeID( ) const { return type(); };        // overrides SMObject
00322 
00323   const IconID iconID( ) const { return IconID::equation; };
00324   // overrides SMObject
00325 
00326   void viewStructure(ostream& ostr) const;              // overrides SMObject
00327 
00328   void printProperties(ostream& ostr) const;            // overrides SMObject
00329 
00330   void printDefinition(ostream& ostr) const;            // overrides SMObject
00331 
00332 
00333 public:
00334 
00335   EIC eic; 
00336   // equation information center.
00337 
00338 protected:
00339 
00340   /////////////////////////////////////////////////////////////////////////
00341   //                                                                     //
00342   // Restricted Access:                                                  //
00343   //                                                                     //
00344   /////////////////////////////////////////////////////////////////////////
00345 
00346   void readMessage(istream&) { };                     // overrides SMObject
00347 
00348 
00349 private:
00350 
00351   /////////////////////////////////////////////////////////////////////////
00352   //                                                                     //
00353   // Data Members:                                                       //
00354   //                                                                     //
00355   /////////////////////////////////////////////////////////////////////////
00356 
00357   SMFPGroup& theGroup;
00358   // The group that this equation is over.
00359 
00360   FreeGroup theFreeGroup;
00361   // The free group generated by theGroup's generators, along with the
00362   // variables.
00363 
00364   Word theWord;
00365   // A Word in theFreeGroup, represents the equation.
00366 
00367   int numOfVar;
00368   // a number of variables
00369 
00370 };
00371 
00372 
00373 #endif

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