#ifndef TAOLINEARSOLVER_H
#define TAOLINEARSOLVER_H

#include "tao_basictypes.h"

class TaoIndexSet;
class TaoVec;
class TaoMat;

/** 
    An abstract class representing the implementation of a Linear Solver
*/

class TaoLinearSolver {

protected:
  
public:
  int rref;

  TaoLinearSolver(){rref=1;};
  virtual ~TaoLinearSolver(void){};

  void * LinearSolverObject;

  /* These two methods are very important */
  virtual int PreSolve(TaoMat*);
  virtual int Solve(TaoVec*,TaoVec*, TaoTruth*);

  /* Some solver need this method */
  virtual int MinQuadraticTrustRegion(TaoVec*,TaoVec*,double, TaoTruth*);

  /* This method makes solver more robust. Good but not mandatory */
  virtual int SetTolerances(double,double,double,int);

  /* These methods are nice to have but not necessary */
  virtual int SetOptions();
  virtual int GetNumberIterations(int *);
  virtual int View();

};

#endif
