mnbigmat.h

Go to the documentation of this file.
00001 // MNBigMat.h
00002 // Created by Steve Anderson, Nov. 22 1996.
00003 
00004 // BigMatrix is for when I need good old-fashioned mxn matrices.
00005 
00006 // Classes:
00007 // BigMatrix
00008 #pragma once
00009 
00010 #include <WTypes.h>
00011 #include <stdio.h>
00012 #include "export.h"
00013 #include "maxheap.h"
00014 
00015 #define BIGMAT_MAX_SIZE 50000  // LAM - defect 292187 - bounced up from 10000
00016 
00031 class BigMatrix: public MaxHeapOperators {
00032 public:
00033     int m, n;
00034     float *val;
00035 
00037     BigMatrix () { val=NULL; m=0; n=0; }
00041     DllExport BigMatrix (int mm, int nn);
00043     DllExport BigMatrix (const BigMatrix & from);
00045     ~BigMatrix () { Clear (); }
00046 
00049     DllExport void Clear ();
00054     DllExport int SetSize (int mm, int nn);
00055 
00058     DllExport float *operator[](int i) const;
00060     DllExport BigMatrix & operator= (const BigMatrix & from);
00061 
00063     DllExport void SetTranspose (BigMatrix & trans) const;
00069     DllExport float Invert();
00072     DllExport void Identity ();
00073 
00074     // Debugging functions:
00078     DllExport void Randomize (float scale);
00081     DllExport void MNDebugPrint ();
00082 
00083     // Do not use -- does nothing.  (Replaced by MNDebugPrint.)
00084     DllExport void dump (FILE *fp);
00085 };
00086 
00087 DllExport extern BOOL BigMatMult (BigMatrix & a, BigMatrix & b, BigMatrix &c);
00088