home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / RLaB 1.15c / examples / sparse.r < prev   
Encoding:
Text File  |  1994-09-20  |  776 b   |  22 lines  |  [TEXT/RLAB]

  1. .
  2. //
  3.  
  4. print_sparse = function ( sm )
  5. {
  6.   for (i in members (sm))
  7.   {
  8.     for (j in members (sm.[i]))
  9.     {
  10.       printf (" row: %6s\tcol: %6s\tvalue: %g\n", i, j, sm.[i].[j]);
  11.     }
  12.   }
  13. };
  14.  
  15. //
  16. // Add two sparse matrices.
  17. //
  18.  
  19. //
  20. // Multiply two sparse matrices.
  21. //
  22.