Solver.h 826 B

12345678910111213141516171819202122232425
  1. // This code is in the public domain -- castanyo@yahoo.es
  2. #pragma once
  3. #ifndef NV_MATH_SOLVER_H
  4. #define NV_MATH_SOLVER_H
  5. #include "nvmath.h"
  6. namespace nv
  7. {
  8. class SparseMatrix;
  9. class FullVector;
  10. // Linear solvers.
  11. NVMATH_API bool LeastSquaresSolver(const SparseMatrix & A, const FullVector & b, FullVector & x, float epsilon = 1e-5f);
  12. NVMATH_API bool LeastSquaresSolver(const SparseMatrix & A, const FullVector & b, FullVector & x, const uint * lockedParameters, uint lockedCount, float epsilon = 1e-5f);
  13. NVMATH_API bool SymmetricSolver(const SparseMatrix & A, const FullVector & b, FullVector & x, float epsilon = 1e-5f);
  14. //NVMATH_API void NonSymmetricSolver(const SparseMatrix & A, const FullVector & b, FullVector & x, float epsilon = 1e-5f);
  15. } // nv namespace
  16. #endif // NV_MATH_SOLVER_H