iohb.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // (C) Copyright Jeremy Siek 2004
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef IOHB_H
  6. #define IOHB_H
  7. #include<stdio.h>
  8. #include<stdlib.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type,
  13. int* Nrhs);
  14. int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
  15. int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
  16. char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
  17. int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
  18. char *Rhstype);
  19. int readHB_mat_double(const char* filename, int colptr[], int rowind[],
  20. double val[]);
  21. int readHB_newmat_double(const char* filename, int* M, int* N, int* nonzeros,
  22. int** colptr, int** rowind, double** val);
  23. int readHB_aux_double(const char* filename, const char AuxType, double b[]);
  24. int readHB_newaux_double(const char* filename, const char AuxType, double** b);
  25. int writeHB_mat_double(const char* filename, int M, int N,
  26. int nz, const int colptr[], const int rowind[],
  27. const double val[], int Nrhs, const double rhs[],
  28. const double guess[], const double exact[],
  29. const char* Title, const char* Key, const char* Type,
  30. char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
  31. const char* Rhstype);
  32. int readHB_mat_char(const char* filename, int colptr[], int rowind[],
  33. char val[], char* Valfmt);
  34. int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros, int** colptr,
  35. int** rowind, char** val, char** Valfmt);
  36. int readHB_aux_char(const char* filename, const char AuxType, char b[]);
  37. int readHB_newaux_char(const char* filename, const char AuxType, char** b, char** Rhsfmt);
  38. int writeHB_mat_char(const char* filename, int M, int N,
  39. int nz, const int colptr[], const int rowind[],
  40. const char val[], int Nrhs, const char rhs[],
  41. const char guess[], const char exact[],
  42. const char* Title, const char* Key, const char* Type,
  43. char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
  44. const char* Rhstype);
  45. int ParseIfmt(char* fmt, int* perline, int* width);
  46. int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag);
  47. void IOHBTerminate(const char* message);
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif