home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / c / math_classes.lha / math_classes / matrix / libmatrix / lumat_getl.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-18  |  244 b   |  21 lines

  1. #include "Matrix.h"
  2.     
  3.     
  4. Matrix getl(const LUmatrix& m)
  5.     {
  6.     Matrix a(m.lu);
  7.     unsigned int i,j;
  8.     for(i=1;i<=a.rows();i++)
  9.         {
  10.         for(j=i+1;j<=a.cols();j++)
  11.             {
  12.             a(i,j)=0.0;
  13.             }
  14.         }
  15.     for(i=1;i<=a.rows();i++)
  16.         {
  17.         a(i,i)=1.0;
  18.         }
  19.     return a;
  20.     }
  21.