ILSSymmLqLanczos.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * @file ILSSymmLqLanczos.h
  3. * @author Paul Bodesheim
  4. * @date 20/01/2012 (dd/mm/yyyy)
  5. */
  6. #ifndef _NICE_ILSSymmLqLanczos_INCLUDE
  7. #define _NICE_ILSSymmLqLanczos_INCLUDE
  8. #include "core/vector/VectorT.h"
  9. #include "GenericMatrix.h"
  10. #include "IterativeLinearSolver.h"
  11. #include "EigValues.h"
  12. #include "ILSConjugateGradients.h"
  13. namespace NICE {
  14. /** @class ILSSymmLqLanczos
  15. * Iteratively solving linear equation systems with the symmetric LQ (SYMMLQ) method using Lanczos process
  16. *
  17. * @author Paul Bodesheim
  18. */
  19. class ILSSymmLqLanczos : public IterativeLinearSolver
  20. {
  21. protected:
  22. bool verbose;
  23. uint maxIterations;
  24. double minDelta;
  25. // bool useFlexibleVersion;
  26. // Vector jacobiPreconditioner;
  27. public:
  28. /**
  29. * @brief constructor
  30. *
  31. * @param verbose output the residual and some debug information for each iteration
  32. * @param maxIterations maximum number of iterations
  33. * @param minDelta minimum difference between two solutions x_t and x_{t+1}
  34. */
  35. ILSSymmLqLanczos( bool verbose = false, uint maxIterations = 10000, double minDelta = 1e-7);//, bool useFlexibleVersion = false);
  36. /** simple destructor */
  37. virtual ~ILSSymmLqLanczos();
  38. // /**
  39. // * @brief set a vector of diagonal elements for the jacobi preconditioner
  40. // *
  41. // * @param jacobiPreconditioner
  42. // */
  43. // void setJacobiPreconditioner ( const Vector & jacobiPreconditioner );
  44. /**
  45. * @brief Solve the linear System A*x = b, where A is indirectly presented
  46. * by the GenericMatrix gm
  47. *
  48. * @param gm GenericMatrix providing matrix-vector multiplications
  49. * @param b Vector on the right hand side of the system
  50. * @param x initial and final estimate
  51. *
  52. * @return method specific status information
  53. */
  54. int solveLin ( const GenericMatrix & gm, const Vector & b, Vector & x );
  55. };
  56. }
  57. #endif