src/LSLib/LSAux.cc
// ____________________________________________________________________________
// ************ MATRIX FUNCTIONS THAT SHOULD BE IN CLASS MATRIX ***************
// ____________________________________________________________________________
MATRIX FUNCTIONS THAT SHOULD BE IN CLASS MATRIX
MATRIX FUNCTIONS THAT SHOULD BE IN CLASS MATRIX
matrix solve_it(matrix& X, matrix& Uguess, matrix& b, int lim)
					     |U > = X|U   > + |b>
 				               i       i-1
  {
  matrix Ui, Uim1;
  Uim1 = Uguess;
std::cout << "\nIteration 0" << " matrix\n" << Uim1; 
  for(int i=1; i<=lim; i++)
    {
    Ui = X * Uim1;
    Ui += b;
std::cout << "\nIteration " << i << " matrix\n" << Ui; 
    Uim1 = Ui;
    }
  return Ui;
  }
matrix solve_it ( matrix & X , matrix & Uguess , matrix & b , int lim ) { matrix Ui , Uim1 ; Uim1 = Uguess ; std :: cout << " \n " << " \n " << Uim1 ; for ( int i = 1 ; i <= lim ; i ++ ) { Ui = X * Uim1 ; Ui += b ; std :: cout << " \n " << i << " \n " << Ui ; Uim1 = Ui ; } return Ui ; }
____________________________________________________________________________
 MATRIX FUNCTIONS THAT SHOULD BE IN CLASS MATRIX
____________________________________________________________________________
____________________________________________________________________________ MATRIX FUNCTIONS THAT SHOULD BE IN CLASS MATRIX ____________________________________________________________________________
// Input		X     : Iteration matrix //			Uguess: Initial guess for U //			b     : Inhomogeneous part //			lim   : Maximum number of iterations allowed // Return		Ui    : Solution obtained by iteration to // //				     |U > = X|U   > + |b> //			               i       i-1