Actual source code: lmvmmat.h

      1: #ifndef LMVMMAT_H
      2: #define LMVMMAT_H

     4:  #include taomat.h

      6: class TaoLMVMMat: public TaoMat{

      8:  protected:

     10:   int lm;
     11:   int lmnow;
     12:   int iter;
     13:   int rejects;
     14:
     15:   double eps;

     17:   TaoVec ** S;
     18:   TaoVec ** Y;
     19:   TaoVec *Gprev;
     20:   TaoVec *Xprev;

     22:   TaoTruth H0default;
     23:   TaoMat *H0;
     24:   TaoVec *H0Vec;

     26:   double y0normsquared;
     27:   double *rho;
     28:   double *beta;
     29:
     30:  public:
     31:
     32:   TaoLMVMMat( TaoVec *, int nlm );
     33:   ~TaoLMVMMat();

     35:   inline int countrejects(){ return(rejects);}

     37:   int reset();
     38:   int update(TaoVec*, TaoVec*);
     39:   int InitialApproximation(TaoVec*);
     40:   int SetH0(TaoMat*);

     42:   int Presolve();
     43:   int Solve(TaoVec*, TaoVec*, TaoTruth*);
     44:   int minQuadraticTrustRegion(TaoVec*,TaoVec*,double, TaoTruth*);
     45:   int GetX0(TaoVec*);

     47:   int Clone(TaoMat**);
     48:   int CopyFrom(TaoMat*);

     50:   /** Get the dimension of the vector spaces */
     51:   int GetDimensions( int*, int * );

     53:   int Multiply(TaoVec*,TaoVec*);
     54:   int MultiplyAdd(TaoVec*,TaoVec*,TaoVec*);
     55:   int MultiplyTranspose(TaoVec*,TaoVec*);
     56:   int MultiplyTransposeAdd(TaoVec*,TaoVec*,TaoVec*);

     58:   int SetDiagonal(TaoVec*);
     59:   int AddDiagonal(TaoVec*);
     60:   int GetDiagonal(TaoVec*);
     61:   int ShiftDiagonal(double);

     63:   int View();
     64:   int extractSubMatrix(TaoMat**,TaoIndexSet*,TaoIndexSet*);

     66:   int RowScale(TaoVec*);
     67:   int ColScale(TaoVec*);

     69:   int D_Fischer(TaoVec *, TaoVec *, TaoVec *, TaoVec *,
     70:                 TaoVec *, TaoVec *, TaoVec *, TaoVec *);
     71:   int D_SFischer(TaoVec *, TaoVec *, TaoVec *, TaoVec *, double,
     72:                  TaoVec *, TaoVec *, TaoVec *, TaoVec *, TaoVec *);

     74: };

     76: #endif