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

/magnus/back_end/Map/include/Endomorphism.h

Go to the documentation of this file.
00001 // Copyright (C) 1995 The New York Group Theory Cooperative
00002 // See magnus/doc/COPYRIGHT for the full notice.
00003 
00004 // Contents: Definition of the FreeGroup class.
00005 //
00006 // Principal Authors: Eugene Paderin, Dmitry Pechkin
00007 //
00008 // Status: in progress
00009 //
00010 // Revision History:
00011 //
00012 // Special Notes:
00013 //
00014 // * The class is primarily designed and used for solving
00015 //   quadratic equations (in free groups).
00016 //
00017 // * The class methods need advanced consistency checking and
00018 //   more manipulation with Map properties.
00019 //
00020 
00021 #ifndef _ENDOMORPHISM_H_
00022 #define _ENDOMORPHISM_H_
00023 
00024 #include "Map.h"
00025 
00026 //---------------------- Endomorphism ---------------------------//
00027 
00028 
00029 class Endomorphism : public Map {
00030 
00031 public:
00032 
00033 ////////////////////////////////////////////////////////////////////
00034 //                                                                //
00035 // Constructors                                                   //
00036 //                                                                //
00037 ////////////////////////////////////////////////////////////////////
00038 
00039         // no default constructor: a domain group must be given
00040 
00041         Endomorphism( const FGGroup& dom) : Map(dom, dom) {}
00042         // make trivial endomorphism on given group
00043 
00044         Endomorphism( const FGGroup& dom, const VectorOf<Word>& generatingImages ) 
00045                 : Map(dom, dom, generatingImages) {}
00046         // an Endomorphism with explicit generatingImages
00047 
00048         Endomorphism( const Map& m ) : Map(m) {}
00049   // cast construtor: to cast an arbitrary map as an endomorphism.
00050   // NB. This rewraps the unchanged representation, hence is in general
00051   // only useful for casting a map known to be an actual endomorphism.
00052 
00053         // copy constructor, operator=, and destructor supplied by compiler
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //                                                                //
00057 // Accessors / Modifiers                                          //
00058 //                                                                //
00059 ////////////////////////////////////////////////////////////////////
00060 
00061         // inherited from the base class
00062 
00063         // const FGGroup& domain( ) const;
00064         // const FGGroup& range( ) const;
00065         // const VectorOf<Word>& generatingImages( ) const;
00066         // Word generatingImages( int i ) const;
00067         // void setGeneratingImages( const VectorOf<Word>& gi );
00068         // void setGeneratingImages( int i, const Word& e  );
00069 
00070   void makeIdentity()
00071         {
00072                 for(int i=0; i<domain().numberOfGenerators(); i++)
00073                         setGeneratingImages(i, Generator(i+1));
00074         }
00075         // turns the endomorphism into the identity automorphism. 
00076 
00077   void reduceGenImages() 
00078         {
00079                 for(int i = 0; i<generatingImages().length(); i++)
00080                         setGeneratingImages(i, generatingImages(i).freelyReduce());
00081         }
00082         // freely reduce generating images to prevent its overgrowth 
00083         // in composition of maps. 
00084         //@ep Should be this done automatically?
00085 
00086 ////////////////////////////////////////////////////////////////////
00087 //                                                                //
00088 // Standard operations                                            //
00089 //                                                                //
00090 ////////////////////////////////////////////////////////////////////
00091 
00092   bool operator ==(const Endomorphism& e) const {
00093     return ( look() == e.look() || *look() == *e.look() ); 
00094   }
00095         //@dp this operator should be defined in Map only. But now
00096         //    Map class has too simple of this one.
00097 
00098 ////////////////////////////////////////////////////////////////////
00099 //                                                                //
00100 // Mapping methods                                                //
00101 //                                                                //
00102 ////////////////////////////////////////////////////////////////////
00103 
00104         // inherited from the base class
00105 
00106 //    friend CondParamLvalue<Map,Word,Generator>::operator Word ( ) const;
00107 //    friend Word& CondParamLvalue<Map,Word,Generator>::operator =
00108 //        ( const Word& ) const;
00109 //    Word imageOf( const Word& w ) const;
00110 //    Word imageOf( const Generator& g ) const;
00111 //    CondParamLvalue<Map,Word,Generator> imageOf( const Generator& g );
00112 //    Word operator()( const Word& w ) const;
00113 //    Word operator()( const Generator& g ) const;
00114 //    CondParamLvalue<Map,Word,Generator> operator()( const Generator& g )
00115 //        { return imageOf(g); }
00116 
00117 // computing images:
00118 
00119 //    Elt evalImage( const Word& w ) const;
00120 //    Elt postEvalImage( const Word& w ) const;
00121 
00122 
00123 ////////////////////////////////////////////////////////////////////
00124 //                                                                //
00125 // Mapping properties                                             //
00126 //                                                                //
00127 ////////////////////////////////////////////////////////////////////
00128 
00129 //    Trichotomy extendsToHom( ) const;
00130 
00131 //    Trichotomy isMono( ) const;
00132 //    Trichotomy isEpi( ) const;
00133 //    Trichotomy isIso( ) const;
00134 //    Trichotomy isTrivialMap( ) const; // @stc impl. tmp.
00135 
00136 ////////////////////////////////////////////////////////////////////
00137 //                                                                //
00138 // Debugging stuff                                                //
00139 //                                                                //
00140 ////////////////////////////////////////////////////////////////////
00141 
00142 #ifdef DEBUG
00143 
00144 //      friend int main( );
00145 
00146         bool consistent( ) {
00147                 return Map::consistent() && domain() == range();
00148         }
00149 
00150 #endif
00151 
00152 };
00153 
00154 #endif
00155 

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