gsl_linalg__tridiag.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* linalg/tridiag.h
  2. *
  3. * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002 Gerard Jungman,
  4. * Brian Gough, David Necas
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. /* Author: G. Jungman
  21. */
  22. /* Low level tridiagonal solvers.
  23. * Used internally in other areas of GSL.
  24. */
  25. #ifndef __GSL_TRIDIAG_H__
  26. #define __GSL_TRIDIAG_H__
  27. #include <stdlib.h>
  28. static
  29. int solve_tridiag_nonsym(
  30. const double diag[], size_t d_stride,
  31. const double abovediag[], size_t a_stride,
  32. const double belowdiag[], size_t b_stride,
  33. const double rhs[], size_t r_stride,
  34. double x[], size_t x_stride,
  35. size_t N
  36. );
  37. static
  38. int solve_tridiag(
  39. const double diag[], size_t d_stride,
  40. const double offdiag[], size_t o_stride,
  41. const double b[], size_t b_stride,
  42. double x[], size_t x_stride,
  43. size_t N);
  44. static
  45. int solve_cyc_tridiag(
  46. const double diag[], size_t d_stride,
  47. const double offdiag[], size_t o_stride,
  48. const double b[], size_t b_stride,
  49. double x[], size_t x_stride,
  50. size_t N
  51. );
  52. static
  53. int solve_cyc_tridiag_nonsym(
  54. const double diag[], size_t d_stride,
  55. const double abovediag[], size_t a_stride,
  56. const double belowdiag[], size_t b_stride,
  57. const double rhs[], size_t r_stride,
  58. double x[], size_t x_stride,
  59. size_t N);
  60. #endif /* __GSL_TRIDIAG_H__ */