Actual source code: taomat.h

      1: #ifndef TAOMATRIX_H
      2: #define TAOMATRIX_H

      4: #include "tao_basictypes.h"

      6: class TaoIndexSet;
      7: class TaoVec;

      9: typedef enum {/* matrix structure */
     10:               TAOMAT_SYMMETRIC_PSD=1,
     11:               TAOMAT_SYMMETRIC=2,
     12:               TAOMAT_UNSYMMETRIC=3 } TaoMatStructure;

     14: class TaoMat {

     16: protected:

     18:                 //  TaoMatStructure tmatstructure;

     20: public:

     22:   virtual ~TaoMat(void){};

     24:   void* MatObject;

     26:   int SetStructure(TaoMatStructure);

     28:   virtual int Compatible(TaoVec*, TaoVec*, TaoTruth*);

     30:   /** Get the dimension of the vector spaces */
     31:   virtual int GetDimensions( int*, int * );
     32:   virtual int Multiply(TaoVec*,TaoVec*);
     33:   virtual int MultiplyTranspose(TaoVec*,TaoVec*);

     35:   virtual int SetDiagonal(TaoVec*);
     36:   virtual int AddDiagonal(TaoVec*);
     37:   virtual int GetDiagonal(TaoVec*);
     38:   virtual int ShiftDiagonal(double);

     40:   virtual int RowScale(TaoVec*);
     41:   virtual int ColScale(TaoVec*);

     43:   virtual int Norm1(double*);

     45:   virtual int D_Fischer(TaoVec *, TaoVec *, TaoVec *, TaoVec *,
     46:                           TaoVec *, TaoVec *, TaoVec *, TaoVec *);
     47:   virtual int D_SFischer(TaoVec *, TaoVec *, TaoVec *, TaoVec *, double,
     48:                          TaoVec *, TaoVec *, TaoVec *, TaoVec *, TaoVec *);

     50:   virtual int CreateReducedMatrix(TaoIndexSet*,TaoIndexSet*,TaoMat**);
     51:   virtual int SetReducedMatrix(TaoMat*,TaoIndexSet*,TaoIndexSet*);

     53:   virtual int View();

     55:   /* These two routines are not needed.  A linear solver may be used instead */
     56:   virtual int Presolve();
     57:   virtual int Solve(TaoVec*,TaoVec*,TaoTruth*);

     59: };

     61: #endif