glpbfx.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* glpbfx.h (basis factorization interface, bignum arithmetic) */
  2. /***********************************************************************
  3. * This code is part of GLPK (GNU Linear Programming Kit).
  4. *
  5. * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
  6. * 2009, 2010 Andrew Makhorin, Department for Applied Informatics,
  7. * Moscow Aviation Institute, Moscow, Russia. All rights reserved.
  8. * E-mail: <mao@gnu.org>.
  9. *
  10. * GLPK is free software: you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation, either version 3 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * GLPK is distributed in the hope that it will be useful, but WITHOUT
  16. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  18. * License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with GLPK. If not, see <http://www.gnu.org/licenses/>.
  22. ***********************************************************************/
  23. #ifndef GLPBFX_H
  24. #define GLPBFX_H
  25. #include "glpgmp.h"
  26. #ifndef GLPBFX_DEFINED
  27. #define GLPBFX_DEFINED
  28. typedef struct { double _opaque_bfx; } BFX;
  29. #endif
  30. #define bfx_create_binv _glp_bfx_create_binv
  31. #define bfx_is_valid _glp_bfx_is_valid
  32. #define bfx_invalidate _glp_bfx_invalidate
  33. #define bfx_factorize _glp_bfx_factorize
  34. #define bfx_ftran _glp_bfx_ftran
  35. #define bfx_btran _glp_bfx_btran
  36. #define bfx_update _glp_bfx_update
  37. #define bfx_delete_binv _glp_bfx_delete_binv
  38. BFX *bfx_create_binv(void);
  39. /* create factorization of the basis matrix */
  40. int bfx_is_valid(BFX *binv);
  41. /* check if factorization is valid */
  42. void bfx_invalidate(BFX *binv);
  43. /* invalidate factorization of the basis matrix */
  44. int bfx_factorize(BFX *binv, int m, int (*col)(void *info, int j,
  45. int ind[], mpq_t val[]), void *info);
  46. /* compute factorization of the basis matrix */
  47. void bfx_ftran(BFX *binv, mpq_t x[], int save);
  48. /* perform forward transformation (FTRAN) */
  49. void bfx_btran(BFX *binv, mpq_t x[]);
  50. /* perform backward transformation (BTRAN) */
  51. int bfx_update(BFX *binv, int j);
  52. /* update factorization of the basis matrix */
  53. void bfx_delete_binv(BFX *binv);
  54. /* delete factorization of the basis matrix */
  55. #endif
  56. /* eof */