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

/magnus/back_end/Group/include/AbelianEquations.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: AbelianEquations.h,v 1.1 2000/02/28 21:24:47 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 2000 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Declaration of the AbelianEquationSolver class.
00009 //
00010 // Principal Authors: Denis Serbin
00011 //
00012 // Status: In progress
00013 //
00014 // Revision History:
00015 //
00016 // Special Notes:
00017 //
00018 //
00019 
00020 
00021 #ifndef _AbelianEquations_h_
00022 #define _AbelianEquations_h_
00023 
00024 #include "AbelianGroup.h"
00025 #include "FPGroup.h"
00026 #include "FreeGroup.h"
00027 #include "File.h"
00028 #include "Vector.h"
00029 #include "Word.h"
00030 #include <iostream.h>
00031 
00032 class AbelianEquationsSolver {
00033 
00034 public:
00035   
00036   AbelianEquationsSolver( const AbelianGroup& a , 
00037                           const VectorOf<Word>& v ,
00038                           int numOfVar );
00039   
00040   AbelianEquationsSolver( )
00041     : rawA( FPGroup() ),
00042     A( FPGroup() )
00043     { }
00044   
00045   void findSolutions( File& file , bool out = true );
00046   
00047   VectorOf<Word> getBasicSolutions() const
00048   {
00049     return x;
00050   }
00051   
00052   VectorOf< VectorOf< VectorOf<int> > > getTorsionPart() const
00053   {
00054     return torsion;
00055   }
00056   
00057   VectorOf< VectorOf< VectorOf<int> > > getParametrizedPart() const
00058   {
00059     return params;
00060   }
00061   
00062   int getSystemRank() const
00063   {
00064     return sysRank;
00065   }
00066   
00067   int getNumberOfParams() const
00068   {
00069     return numberOfVariables - sysRank;
00070   }
00071   
00072   bool solIsAllGroup( ) const;
00073   
00074   bool haveSolutions() const;
00075   
00076 private:
00077   
00078   bool root( Word& , int ) const;
00079   
00080   void makeSystem();
00081   
00082   void printRawSystem( File& ) const;
00083   void printSystem( File& ) const;
00084   
00085   AbelianGroup rawA;
00086   AbelianGroup A;
00087   VectorOf<Word> rawSystem;
00088   VectorOf<Word> system;
00089   VectorOf<Word> b;
00090   int numberOfVariables;
00091   int sysRank;
00092   int haveSol; // -1 - system have no solutions
00093                //  0 - system have the group A as a set of solutions
00094                //  1 - the set of solutions isn't equal to A
00095   
00096   VectorOf<Word> x;
00097   VectorOf< VectorOf< VectorOf<int> > > torsion;
00098   VectorOf< VectorOf< VectorOf<int> > > params;  
00099 };
00100 
00101 #endif  
00102 
00103 
00104 
00105 

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