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

/magnus/back_end/Equations/include/DGESolver.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: DGESolver.h,v 1.1 1998/08/03 21:03:06 bormotov Exp $
00003  */
00004  
00005 // Copyright (C) 1998 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 //
00008 // Contents: Definition of DGESolver
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 
00018 #ifndef _DGESolver_h_
00019 #define _DGESolver_h_
00020 
00021 #include "FreeGroup.h"
00022 
00023 
00024 // ------------------------------- DGESolver ------------------------------- //
00025 
00026 
00027 class DGESolver
00028 {
00029 
00030 public:
00031   
00032   /////////////////////////////////////////////////////////////////////////
00033   //                                                                     //
00034   // Constructors:                                                       //
00035   //                                                                     //
00036   /////////////////////////////////////////////////////////////////////////
00037   
00038   DGESolver( FreeGroup F, VectorOf<Chars> vNames, Word eq );
00039   
00040   // copy constructor supplied by compiler.
00041   
00042   ~DGESolver( );
00043 
00044   
00045   /////////////////////////////////////////////////////////////////////////
00046   //                                                                     //
00047   // Accessors:                                                          //
00048   //                                                                     //
00049   /////////////////////////////////////////////////////////////////////////
00050 
00051   bool getSolution( const Word& u, Map& solution );
00052   // returns a solution for equation eq = u
00053 
00054 
00055   /////////////////////////////////////////////////////////////////////////
00056   //                                                                     //
00057   // OI:                                                                 //
00058   //                                                                     //
00059   /////////////////////////////////////////////////////////////////////////
00060 
00061 
00062 private:
00063 
00064   /////////////////////////////////////////////////////////////////////////
00065   //                                                                     //
00066   // Private functions:                                                  //
00067   //                                                                     //
00068   /////////////////////////////////////////////////////////////////////////
00069 
00070   void defineRange( int curVar );
00071   // defines range for the variable and its inverse
00072 
00073   bool pickNextValue( int curVar );
00074   // tries to pick sutable value for curVar and its inverse
00075 
00076   bool findInverseOf( Word u, int p, int q, int& first, int& last );
00077   // finds inverse of u in w[p,q] and returns its coordinates in first and last
00078  
00079 
00080   /////////////////////////////////////////////////////////////////////////
00081   //                                                                     //
00082   // Data members:                                                       //
00083   //                                                                     //
00084   /////////////////////////////////////////////////////////////////////////
00085   
00086   struct VarInfo { bool isTrivial; int first, last, firstP, lastP; };
00087   // first and last - positions in u
00088   // firstP and lastP - possible range for the variable
00089 
00090   FreeGroup theGroup;
00091   VectorOf<Chars> varNames;
00092   int numOfVars, numOfConsts;
00093   Word equation, w;
00094   int wLen, eqLen;
00095    
00096 
00097   VarInfo *varInfo;    // current substitution
00098   VarInfo *invVarInfo; 
00099   // info about the inverses of the variables; isTrivial is not used here
00100 
00101   VectorOf<int> buffer;
00102   // filled with current value of the variables; used define variables range 
00103 
00104   VectorOf<int> invVarPos; // positions of the inverses in the equation
00105 
00106 };
00107 
00108 #endif
00109 
00110 
00111 
00112 
00113 

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