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

/magnus/back_end/AProducts/include/MagnusBreakdown.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: MagnusBreakdown.h,v 1.4 1998/05/14 19:44:03 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: 
00009 //
00010 // Principal Author:
00011 //
00012 // Status: in progress
00013 //
00014 // Usage:
00015 //
00016 //
00017 // Special Notes:
00018 //
00019 // Revision History:
00020 //
00021 //  97/02/13 @dp Added VectorOf<Range> getSubscriptsTable() const.
00022 //               Made  adjoinSubscript(), extractSubscript() public.
00023 //
00024 // Would we store all tree of computations? No! We need to provide 
00025 // some repository to store all informations of computations. 
00026 // This class only solves Magnus breakdown step by step.  
00027 
00028 
00029 
00030 #ifndef _MAGNUS_BREAKDOWN_H_
00031 #define _MAGNUS_BREAKDOWN_H_
00032 
00033 #include "OneRelatorGroup.h"
00034 #include "HNNExtOfORGroup.h"
00035 #include "AbelianWord.h"
00036 #include "Map.h"
00037 #include "SuperGen.h"
00038 #include "Range.h"
00039 #include "Automorphism.h"
00040 
00041 
00042 class MagnusBreakdown
00043 {
00044 
00045 public:
00046 
00047   /////////////////////////////////////////////////////////////////////////
00048   //                                                                     //
00049   //  Constructors:                                                      //
00050   //                                                                     //
00051   /////////////////////////////////////////////////////////////////////////
00052 
00053   MagnusBreakdown( const OneRelatorGroup& G );
00054     
00055   // No default constructor, but it can be easily arranged by
00056   // combining default FPGroup constructor and previsious one.
00057 
00058   // Copy constructor and operator = provided by compiler
00059   
00060   
00061   /////////////////////////////////////////////////////////////////////////
00062   //                                                                     //
00063   //  Accessors:                                                         //
00064   //                                                                     //
00065   /////////////////////////////////////////////////////////////////////////
00066 
00067   OneRelatorGroup getORGroup() const { return theORGroup; }
00068   // Returns a current node of Magnus breakdown.
00069 
00070   HNNExtOfORGroup getHNNPresentation() const;
00071   // The caller should call `findHNNPresentation' before 
00072   // and checks a presentation to be existed, 
00073   // otherwise this function causes error.
00074 
00075   int numberOfUsedGenerators() const { return (stable.exponent()==0 ? 1 : 2); }
00076 
00077   Generator stableGenerator() const { return stable.generator(); }
00078 
00079   bool hasAccompGenerator() const { 
00080     return (stable.exponent() == 0 ? false : true ); 
00081   }
00082 
00083   Generator accompGenerator() const;
00084 
00085   ListOf<Generator> getGeneratorsWithZeroExpSum() const { 
00086     return theGeneratorsWithZeroExpSum;
00087   }
00088   
00089   ListOf<Generator> getGeneratorsWithNonzeroExpSum() const {
00090     return theGeneratorsWithNonzeroExpSum;
00091   }
00092 
00093   ListOf<Generator> getDefaultBreakdownGenerators() const;
00094 
00095   int getExponentSumOf( const Generator& g ) const {
00096     return exponentsOfOldGenerators[ abs(ord(g))-1 ];
00097   }
00098 
00099   Word rewriteWordInOldGenerators( const Word& w ) const; 
00100 
00101   Word rewriteWordInNewGenerators( const Word& w ) const;
00102 
00103   Automorphism embeddingOfORGroups( ) const { return theEmbeddingOfORGroups; }
00104 
00105   Map toHNNPresentation( ) const { return mapToHNN; }
00106 
00107   Map toORGroup( ) const { return mapToORGroup; }
00108 
00109   int numberOfOldGenerators( ) const { return theNumberOfOldGenerators; }
00110   int numberOfNewGenerators( ) const { return theNumberOfNewGenerators; }
00111 
00112   VectorOf<Range> getSubscriptsTable() const { return subscriptsOfGenerator; }
00113   
00114   Generator adjoinSubscript(const Generator& oldGen, int subscript) const;
00115   Generator extractSubscript(const Generator& newGen, int& subscript) const;
00116   // @dp NOTE: these procedures work with the bigger one-relator group.
00117 
00118   /////////////////////////////////////////////////////////////////////////
00119   //                                                                     //
00120   //  Start/continue:                                                    //
00121   //                                                                     //
00122   /////////////////////////////////////////////////////////////////////////
00123 
00124   Trichotomy hasHNNPresentation() const { return haveHNNPresentation; }
00125   // `no' means the node is a (terminal) list. 
00126   // `dontknow' means the node is not investigated yet.
00127 
00128   bool findHNNPresentation();
00129   // Does one step of Magnus breakdown.
00130 
00131   bool findHNNPresentation( const Generator& stableGen );
00132 
00133   bool findHNNPresentation( const Generator& stableGen, 
00134                             const Generator& accompGen );
00135 
00136 
00137   /////////////////////////////////////////////////////////////////////////
00138   //                                                                     //
00139   // I/O routines:                                                       //
00140   //                                                                     //
00141   /////////////////////////////////////////////////////////////////////////
00142   
00143   void printOn( ostream& ostr ) const;
00144 
00145   MagnusBreakdown *readFrom( istream& istr ) const;
00146 
00147   void debugPrint( ostream& ostr ) const;
00148 
00149 protected:
00150 
00151   /////////////////////////////////////////////////////////////////////////
00152   //                                                                     //
00153   // Protected functions:                                                //
00154   //                                                                     //
00155   /////////////////////////////////////////////////////////////////////////
00156 
00157   void makeHNNPresentation( );
00158   bool chooseStableGenerator( );
00159   void makeSubscriptsTable( );
00160   void makeEmbedding();
00161   void makeTranslationTables();
00162 
00163 
00164   // Data members:
00165 
00166   // fixed data members:
00167 
00168   OneRelatorGroup       theORGroup;
00169   int                   theNumberOfOldGenerators;
00170   ListOf<Generator>     theGeneratorsWithZeroExpSum;
00171   ListOf<Generator>     theGeneratorsWithNonzeroExpSum;
00172   VectorOf<int>         exponentsOfOldGenerators;
00173 
00174   
00175   // volatile data members:
00176 
00177   OneRelatorGroup       theLargerORGroup;
00178   HNNExtOfORGroup       theHNNPresentation;
00179   bool                  haveHNNPresentation;
00180   Automorphism          theEmbeddingOfORGroups;
00181   Map                   mapToHNN;
00182   Map                   mapToORGroup;
00183   SuperGen              stable, accomp;
00184   Generator             stableNewGen;
00185   int                   theNumberOfNewGenerators;
00186   VectorOf<Chars>       theNamesOfNewGenerators;
00187   VectorOf<Range>       subscriptsOfGenerator;
00188   VectorOf<int>         toNewGens;
00189   VectorOf<int>         toOldGens;
00190 
00191 };
00192 
00193 ProductOfRelatorConjugates liftUpProduct( 
00194   const ProductOfRelatorConjugates& mProduct, 
00195   const MagnusBreakdown& M, const OneRelatorGroup& G 
00196 );
00197 
00198 
00199 // --------- Inline members of MagnusBreakdown ------------------ //
00200 
00201 inline HNNExtOfORGroup MagnusBreakdown::getHNNPresentation() const 
00202 {
00203 #if SAFETY > 0
00204   if( !haveHNNPresentation )
00205     error("Called MagnusBreakdown::getHNNPresentation() "
00206           "when HNN presentation does not exist.");
00207 #endif
00208   return theHNNPresentation;
00209 }
00210 
00211 inline Generator MagnusBreakdown::accompGenerator() const 
00212 {
00213 #if SAFETY > 0
00214   if( stable.exponent() == 0 )
00215     error("MagnusBreakdown::accompGenerator(): Calling for "
00216           "an accompanying generator when it is not defined.");
00217 #endif
00218   return accomp.generator();
00219 }
00220 
00221 #endif

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