00001 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00002 /* ******** *** SparseLib++ */ 00003 /* ******* ** *** *** *** */ 00004 /* ***** *** ******** ******** */ 00005 /* ***** *** ******** ******** R. Pozo */ 00006 /* ** ******* *** ** *** *** K. Remington */ 00007 /* ******** ******** A. Lumsdaine */ 00008 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00009 /* */ 00010 /* */ 00011 /* SparseLib++ : Sparse Matrix Library */ 00012 /* */ 00013 /* National Institute of Standards and Technology */ 00014 /* University of Notre Dame */ 00015 /* Authors: R. Pozo, K. Remington, A. Lumsdaine */ 00016 /* */ 00017 /* NOTICE */ 00018 /* */ 00019 /* Permission to use, copy, modify, and distribute this software and */ 00020 /* its documentation for any purpose and without fee is hereby granted */ 00021 /* provided that the above notice appear in all copies and supporting */ 00022 /* documentation. */ 00023 /* */ 00024 /* Neither the Institutions (National Institute of Standards and Technology, */ 00025 /* University of Notre Dame) nor the Authors make any representations about */ 00026 /* the suitability of this software for any purpose. This software is */ 00027 /* provided ``as is'' without expressed or implied warranty. */ 00028 /* */ 00029 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00030 00031 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00032 /* Read a Harwell-Boeing file into a compressed Column matrix */ 00033 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 00034 00035 00036 #include "iohb.h" 00037 00038 00039 CompCol_Mat_double& readHB_mat(const char *filename, CompCol_Mat_double *A); 00040 CompRow_Mat_double& readHB_mat(const char *filename, CompRow_Mat_double *A); 00041 Coord_Mat_double& readHB_mat(const char *filename, Coord_Mat_double *A); 00042 00043 const CompCol_Mat_double& writeHB_mat(const char *filename, 00044 const CompCol_Mat_double &A, 00045 int nrhs=0, const double *rhs = 0, 00046 const char *title=0, const char *key=0); 00047 00048 const CompRow_Mat_double& writeHB_mat(const char *filename, 00049 const CompRow_Mat_double &A, 00050 int nrhs=0, const double* rhs = 0, 00051 const char *title=0, const char *key=0); 00052 00053 00054 const Coord_Mat_double& writeHB_mat(const char *filename, 00055 const Coord_Mat_double &A, 00056 int nrhs=0, const double* rhs=0, 00057 const char *title=0, const char *key=0); 00058 00059 VECTOR_double& readHB_rhs(const char *filename, VECTOR_double *b, int j=0);