IpLapack.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright (C) 2005, 2009 International Business Machines and others.
  2. // All Rights Reserved.
  3. // This code is published under the Eclipse Public License.
  4. //
  5. // $Id: IpLapack.hpp 1861 2010-12-21 21:34:47Z andreasw $
  6. //
  7. // Authors: Andreas Waechter IBM 2005-12-25
  8. #ifndef __IPLAPACK_HPP__
  9. #define __IPLAPACK_HPP__
  10. #include "IpUtils.hpp"
  11. #include "IpException.hpp"
  12. namespace Ipopt
  13. {
  14. DECLARE_STD_EXCEPTION(LAPACK_NOT_INCLUDED);
  15. /** Wrapper for LAPACK subroutine DPOTRS. Solving a linear system
  16. * given a Cholesky factorization. We assume that the Cholesky
  17. * factor is lower traiangular. */
  18. void IpLapackDpotrs(Index ndim, Index nrhs, const Number *a, Index lda,
  19. Number *b, Index ldb);
  20. /** Wrapper for LAPACK subroutine DPOTRF. Compute Cholesky
  21. * factorization (lower triangular factor). info is the return
  22. * value from the LAPACK routine. */
  23. void IpLapackDpotrf(Index ndim, Number *a, Index lda, Index& info);
  24. /** Wrapper for LAPACK subroutine DSYEV. Compute the Eigenvalue
  25. * decomposition for a given matrix. If compute_eigenvectors is
  26. * true, a will contain the eigenvectors in its columns on
  27. * return. */
  28. void IpLapackDsyev(bool compute_eigenvectors, Index ndim, Number *a,
  29. Index lda, Number *w, Index& info);
  30. /** Wrapper for LAPACK subroutine DGETRF. Compute LU factorization.
  31. * info is the return value from the LAPACK routine. */
  32. void IpLapackDgetrf(Index ndim, Number *a, Index* pivot, Index lda,
  33. Index& info);
  34. /** Wrapper for LAPACK subroutine DGETRS. Solving a linear system
  35. * given a LU factorization. */
  36. void IpLapackDgetrs(Index ndim, Index nrhs, const Number *a, Index lda,
  37. Index* ipiv, Number *b, Index ldb);
  38. } // namespace Ipopt
  39. #endif