glpbfd.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* glpbfd.h (LP basis factorization driver) */
  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 GLPBFD_H
  24. #define GLPBFD_H
  25. #ifndef GLPBFD_PRIVATE
  26. typedef struct { double _opaque_bfd[100]; } BFD;
  27. #endif
  28. /* return codes: */
  29. #define BFD_ESING 1 /* singular matrix */
  30. #define BFD_ECOND 2 /* ill-conditioned matrix */
  31. #define BFD_ECHECK 3 /* insufficient accuracy */
  32. #define BFD_ELIMIT 4 /* update limit reached */
  33. #define BFD_EROOM 5 /* SVA overflow */
  34. #define bfd_create_it _glp_bfd_create_it
  35. BFD *bfd_create_it(void);
  36. /* create LP basis factorization */
  37. #define bfd_set_parm _glp_bfd_set_parm
  38. void bfd_set_parm(BFD *bfd, const void *parm);
  39. /* change LP basis factorization control parameters */
  40. #define bfd_factorize _glp_bfd_factorize
  41. int bfd_factorize(BFD *bfd, int m, const int bh[], int (*col)
  42. (void *info, int j, int ind[], double val[]), void *info);
  43. /* compute LP basis factorization */
  44. #define bfd_ftran _glp_bfd_ftran
  45. void bfd_ftran(BFD *bfd, double x[]);
  46. /* perform forward transformation (solve system B*x = b) */
  47. #define bfd_btran _glp_bfd_btran
  48. void bfd_btran(BFD *bfd, double x[]);
  49. /* perform backward transformation (solve system B'*x = b) */
  50. #define bfd_update_it _glp_bfd_update_it
  51. int bfd_update_it(BFD *bfd, int j, int bh, int len, const int ind[],
  52. const double val[]);
  53. /* update LP basis factorization */
  54. #define bfd_get_count _glp_bfd_get_count
  55. int bfd_get_count(BFD *bfd);
  56. /* determine factorization update count */
  57. #define bfd_delete_it _glp_bfd_delete_it
  58. void bfd_delete_it(BFD *bfd);
  59. /* delete LP basis factorization */
  60. #endif
  61. /* eof */