home *** CD-ROM | disk | FTP | other *** search
/ vis-ftp.cs.umass.edu / vis-ftp.cs.umass.edu.tar / vis-ftp.cs.umass.edu / pub / CMU / cmu_files / cal / matrix.h < prev    next >
Text File  |  1990-12-11  |  1KB  |  73 lines

  1. /* matrix.h -- define types for matrices using Iliffe vectors
  2.  *************************************************************
  3.  * HISTORY
  4.  * 25-Nov-80  David Smith (drs) at Carnegie-Mellon University
  5.  * Changed virtual base address name to "el" for all data
  6.  * types (Previously vali, vald, ...)  This was possible due to the
  7.  * compiler enhancement which keeps different structure declarations
  8.  * separate.
  9.  *
  10.  * 30-Oct-80  David Smith (drs) at Carnegie-Mellon University
  11.  *    Rewritten for record-style matrices
  12.  *
  13.  */
  14.  
  15. typedef struct {
  16.     int    lb1, ub1, lb2, ub2;
  17.     char    *mat_sto;
  18.     char    **el;
  19.     }
  20.     cmat;
  21.  
  22. typedef struct {
  23.     int        lb1, ub1, lb2, ub2;
  24.     char        *mat_sto;
  25.     unsigned char    **el;
  26.     }
  27.     ucmat;
  28.  
  29. typedef struct {
  30.     int    lb1, ub1, lb2, ub2;
  31.     char    *mat_sto;
  32.     short    **el;
  33.     }
  34.     smat;
  35.  
  36. typedef struct {
  37.     int    lb1, ub1, lb2, ub2;
  38.     char    *mat_sto;
  39.     int    **el;
  40.     }
  41.     imat;
  42.  
  43. typedef struct {
  44.     int    lb1, ub1, lb2, ub2;
  45.     char    *mat_sto;
  46.     long    **el;
  47.     }
  48.     lmat;
  49.  
  50. typedef struct {
  51.     int    lb1, ub1, lb2, ub2;
  52.     char    *mat_sto;
  53.     float    **el;
  54.     }
  55.     fmat;
  56.  
  57. typedef struct {
  58.     int    lb1, ub1, lb2, ub2;
  59.     char    *mat_sto;
  60.     double    **el;
  61.     }
  62.     dmat;
  63.  
  64. cmat    newcmat();
  65. ucmat    newucmat();
  66. smat    newsmat();
  67. imat    newimat();
  68. lmat    newlmat();
  69. fmat    newfmat();
  70. dmat    newdmat();
  71.  
  72. #define freemat(m) free((m).mat_sto)
  73.