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

/magnus/back_end/AProducts/include/APwithOneRelator.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: APwithOneRelator.h,v 1.4 2000/02/09 22:08:17 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1994 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of the APwithOneRelator class.
00009 //
00010 //  It is implemented ONLY for free groups.
00011 //
00012 // Principal Authors: Eugene Paderin, Dmitry Pechkin
00013 //
00014 // Status: in progress
00015 //
00016 // Revision History:
00017 //
00018 // Special Notes:
00019 //
00020 //
00021 
00022 #ifndef _APRODUCT_WITH_ONE_RELATOR_H_
00023 #define _APRODUCT_WITH_ONE_RELATOR_H_
00024 
00025 
00026 #include "APofFreeGroups.h"
00027 #include "APwithOneRelatorRep.h"
00028 
00029 
00030 class APwithOneRelator : public DerivedObjectOf<AmalgProductOfFreeGroups,APwithOneRelatorRep> {
00031 
00032 public:
00033 
00034   ///////////////////////////////////////////////////////
00035   //                                                   //
00036   //  Constructors                                     //
00037   //                                                   //
00038   ///////////////////////////////////////////////////////
00039 
00040   // Copy constructor, operator= and destructor provided by compiler
00041 
00042   APwithOneRelator() :
00043   DerivedObjectOf<AmalgProductOfFreeGroups, APwithOneRelatorRep>(
00044     new APwithOneRelatorRep( 0 )
00045   ) {}
00046   // Default constructor is provided solely for constructing an AP group
00047   // from an input stream, e.g. like this:
00048   //
00049   //   APwithOneRelator G;
00050   //   Chars errMesg = cin >> G;
00051   //   ...
00052   // Do not use it for purposes other than this.
00053 
00054   APwithOneRelator(const FreeGroup& g1, const FreeGroup& g2,
00055                    const Word& a, const Word& b ) :
00056     DerivedObjectOf<AmalgProductOfFreeGroups, APwithOneRelatorRep>(
00057       new APwithOneRelatorRep(g1, g2, a, b)
00058     ) {}
00059   // Construct an amalgamated product of given free groups. Given words
00060   // generate cyclic associated subgroups.
00061 
00062   APwithOneRelator(const FreeGroup& g1, const FreeGroup& g2,
00063                    const VectorOf<Word>& gen1,
00064                    const VectorOf<Word>& gen2  ) 
00065   : DerivedObjectOf<AmalgProductOfFreeGroups, APwithOneRelatorRep>
00066     ( new APwithOneRelatorRep(g1, g2, gen1, gen2) ) {}
00067   // Construct an amalgamated product of given free groups. Given vectors
00068   // of words generate associated subgroups. Length of vectors must be 1.
00069 
00070   APwithOneRelator(const SGofFreeGroup& sg1, const SGofFreeGroup& sg2)
00071   : DerivedObjectOf<AmalgProductOfFreeGroups, APwithOneRelatorRep>
00072     ( new APwithOneRelatorRep(sg1, sg2) ) {}
00073   // Construct an amalgamated product with given (associated) subgroups
00074   // which store references to their parent groups.
00075 
00076   APwithOneRelator( const Group& G ) 
00077   : DerivedObjectOf<AmalgProductOfFreeGroups,APwithOneRelatorRep>(G) { }
00078   // Cast construtor: to cast an arbitrary group as an AP group.
00079   // NB. This rewraps the unchanged representation, hence is in general
00080   // only useful for casting a group known to be an actual AP group.
00081 
00082   // Destructor provided by compiler.
00083 
00084   ///////////////////////////////////////////////////////
00085   //                                                   //
00086   //  Accessors / Modifiers                            //
00087   //                                                   //
00088   ///////////////////////////////////////////////////////
00089 
00090   // Type actualType( ) const;
00091   // Overrides pseudo-virtual AmalgProductOfFreeGroups::actualType().
00092 
00093   static Type type( ) { return APwithOneRelatorRep::type(); }
00094   // Overrides AmalgProductOfFreeGroups::type().
00095 
00096   ///////////////////////////////////////////////////////
00097   //                                                   //
00098   //  Methods dealing with group structure             //
00099   //                                                   //
00100   ///////////////////////////////////////////////////////
00101 
00102   // All of them are inherited from AmalgProductOfFreeGroups.
00103 
00104   ///////////////////////////////////////////////////////
00105   //                                                   //
00106   //  Methods which deal with group elements           //
00107   //                                                   //
00108   ///////////////////////////////////////////////////////
00109 
00110   // Trichotomy conjugacyProblem( const Word& u, const Word& v ) const;
00111   // Overrides pseudo-virtual AmalgProductOfFreeGroups::conjugacyProblem().
00112 
00113   // VectorOf<int> computeInvariants() const;
00114   // Overrides pseudo-virtual AmalgProductOfFreeGroups::computeInvariants().
00115 
00116   // void maximalRoot(const Word& w, Word& root, int& power);
00117   // Overrides pseudo-virtual AmalgProductOfFreeGroups::maximalRoot().
00118 
00119   Trichotomy conjugacyProblem(const Word& u, const Word& w, Word& conjugator) 
00120     const {
00121       return look()->conjugacyProblem(u,w,conjugator);
00122     }
00123   // Returns `yes' and conjugator of w if u and v represent conjugate 
00124   // elements (w^conjugator = u).  `no' if not.
00125 
00126   VectorOf<Word> centralizerOf(const Word& w) const {
00127     return look()->centralizerOf(w);
00128   }
00129   // Returns set of words which generate centralizer of given word.
00130 
00131   ///////////////////////////////////////////////////////
00132   //                                                   //
00133   //  Private helper stuff:                            //
00134   //                                                   //
00135   ///////////////////////////////////////////////////////
00136 
00137 protected:
00138 
00139   // Special wrapping constructor to wrap new representations (returned
00140   // by eg. delegated methods) and for base initialisation by derived
00141   // classes:
00142 
00143   APwithOneRelator( APwithOneRelatorRep* newrep ) :
00144     DerivedObjectOf<AmalgProductOfFreeGroups,APwithOneRelatorRep>(newrep) { }
00145 
00146 
00147   ///////////////////////////////////////////////////////
00148   //                                                   //
00149   //  Debugging stuff                                  //
00150   //                                                   //
00151   ///////////////////////////////////////////////////////
00152 
00153 private:
00154 
00155 #ifdef DEBUG
00156   friend int main(...);
00157   friend void debugPrint(ostream&, const APwithOneRelator& g);
00158 #endif
00159 
00160 };
00161 
00162 #endif
00163 
00164 

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