/*
Fri Aug 15 16:29:47 EDT 1997
Harwell-Boeing File I/O in C
V. 1.0
National Institute of Standards and Technology, MD.
K.A. Remington
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NOTICE
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted
provided that the above copyright notice appear in all copies and
that both the copyright notice and this permission notice appear in
supporting documentation.
Neither the Author nor the Institution (National Institute of Standards
and Technology) make any representations about the suitability of this
software for any purpose. This software is provided "as is" without
expressed or implied warranty.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---------------------
INTERFACE DESCRIPTION
---------------------
---------------
QUERY FUNCTIONS
---------------
FUNCTION:
int readHB_info(const char *filename, int *M, int *N, int *nz,
char **Type, int *Nrhs)
DESCRIPTION:
The readHB_info function opens and reads the header information from
the specified Harwell-Boeing file, and reports back the number of rows
and columns in the stored matrix (M and N), the number of nonzeros in
the matrix (nz), the 3-character matrix type(Type), and the number of
right-hand-sides stored along with the matrix (Nrhs). This function
is designed to retrieve basic size information which can be used to
allocate arrays.
FUNCTION:
int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
char *Rhstype)
DESCRIPTION:
More detailed than the readHB_info function, readHB_header() reads from
the specified Harwell-Boeing file all of the header information.
------------------------------
DOUBLE PRECISION I/O FUNCTIONS
------------------------------
FUNCTION:
int readHB_newmat_double(const char *filename, int *M, int *N, *int nz,
int **colptr, int **rowind, double**val)
int readHB_mat_double(const char *filename, int *colptr, int *rowind,
double*val)
DESCRIPTION:
This function opens and reads the specified file, interpreting its
contents as a sparse matrix stored in the Harwell/Boeing standard
format. (See readHB_aux_double to read auxillary vectors.)
-- Values are interpreted as double precision numbers. --
The "mat" function uses _pre-allocated_ vectors to hold the index and
nonzero value information.
The "newmat" function allocates vectors to hold the index and nonzero
value information, and returns pointers to these vectors along with
matrix dimension and number of nonzeros.
FUNCTION:
int readHB_aux_double(const char* filename, const char AuxType, double b[])
int readHB_newaux_double(const char* filename, const char AuxType, double** b)
DESCRIPTION:
This function opens and reads from the specified file auxillary vector(s).
The char argument Auxtype determines which type of auxillary vector(s)
will be read (if present in the file).
AuxType = 'F' right-hand-side
AuxType = 'G' initial estimate (Guess)
AuxType = 'X' eXact solution
If Nrhs > 1, all of the Nrhs vectors of the given type are read and
stored in column-major order in the vector b.
The "newaux" function allocates a vector to hold the values retrieved.
The "mat" function uses a _pre-allocated_ vector to hold the values.
FUNCTION:
int writeHB_mat_double(const char* filename, int M, int N,
int nz, const int colptr[], const int rowind[],
const double val[], int Nrhs, const double rhs[],
const double guess[], const double exact[],
const char* Title, const char* Key, const char* Type,
char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
const char* Rhstype)
DESCRIPTION:
The writeHB_mat_double function opens the named file and writes the specified
matrix and optional auxillary vector(s) to that file in Harwell-Boeing
format. The format arguments (Ptrfmt,Indfmt,Valfmt, and Rhsfmt) are
character strings specifying "Fortran-style" output formats -- as they
would appear in a Harwell-Boeing file. They are used to produce output
which is as close as possible to what would be produced by Fortran code,
but note that "D" and "P" edit descriptors are not supported.
If NULL, the following defaults will be used:
Ptrfmt = Indfmt = "(8I10)"
Valfmt = Rhsfmt = "(4E20.13)"
-----------------------
CHARACTER I/O FUNCTIONS
-----------------------
FUNCTION:
int readHB_mat_char(const char* filename, int colptr[], int rowind[],
char val[], char* Valfmt)
int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros,
int** colptr, int** rowind, char** val, char** Valfmt)
DESCRIPTION:
This function opens and reads the specified file, interpreting its
contents as a sparse matrix stored in the Harwell/Boeing standard
format. (See readHB_aux_char to read auxillary vectors.)
-- Values are interpreted as char strings. --
(Used to translate exact values from the file into a new storage format.)
The "mat" function uses _pre-allocated_ arrays to hold the index and
nonzero value information.
The "newmat" function allocates char arrays to hold the index
and nonzero value information, and returns pointers to these arrays
along with matrix dimension and number of nonzeros.
FUNCTION:
int readHB_aux_char(const char* filename, const char AuxType, char b[])
int readHB_newaux_char(const char* filename, const char AuxType, char** b,
char** Rhsfmt)
DESCRIPTION:
This function opens and reads from the specified file auxillary vector(s).
The char argument Auxtype determines which type of auxillary vector(s)
will be read (if present in the file).
AuxType = 'F' right-hand-side
AuxType = 'G' initial estimate (Guess)
AuxType = 'X' eXact solution
If Nrhs > 1, all of the Nrhs vectors of the given type are read and
stored in column-major order in the vector b.
The "newaux" function allocates a character array to hold the values
retrieved.
The "mat" function uses a _pre-allocated_ array to hold the values.
FUNCTION:
int writeHB_mat_char(const char* filename, int M, int N,
int nz, const int colptr[], const int rowind[],
const char val[], int Nrhs, const char rhs[],
const char guess[], const char exact[],
const char* Title, const char* Key, const char* Type,
char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
const char* Rhstype)
DESCRIPTION:
The writeHB_mat_char function opens the named file and writes the specified
matrix and optional auxillary vector(s) to that file in Harwell-Boeing
format. The format arguments (Ptrfmt,Indfmt,Valfmt, and Rhsfmt) are
character strings specifying "Fortran-style" output formats -- as they
would appear in a Harwell-Boeing file. Valfmt and Rhsfmt must accurately
represent the character representation of the values stored in val[]
and rhs[].
If NULL, the following de
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
I downloaded this template library for matrix manipulation when I tried to use matrix in vc++. It's a good library, with many functions, and common implementation for matrix computation, such as LQ decompostion and eigenvector retrieval. NOTE: ANOTHER FILE NAMED MTL-REFERENCE IS UPLOADED FOR BETTER USE OF THIS LIBRARY.
资源推荐
资源详情
资源评论
收起资源包目录
mtl-2.1.2-20 matrix template library c++ (211个子文件)
Makefile.am 4KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 287B
Makefile.am 260B
Makefile.am 200B
Makefile.am 123B
Makefile.am 75B
ANNOUNCE 1KB
iohb.c 60KB
mmio.c 11KB
math.cc 17KB
blas_interface.cc 15KB
matrix_indices_test.cc 14KB
matrix_ij_test.cc 8KB
cholesky_external.cc 6KB
gmres.cc 6KB
ilut.cc 5KB
ilu.cc 5KB
iccg.cc 5KB
cholesky.cc 5KB
qmr.cc 5KB
matrix_row_col_test.cc 4KB
matrix_oned_test.cc 4KB
matrix_iterator_test.cc 4KB
matrix_scaled_test.cc 3KB
matmat_mult_test.cc 3KB
matrix_trans_test.cc 3KB
lu_solve.cc 3KB
matmat_copy_test.cc 3KB
matmat_add_test.cc 3KB
geequ.cc 3KB
sparse_copy.cc 3KB
banded_matvec_mult.cc 2KB
getrf.cc 2KB
matrix_iter_ij_test.cc 2KB
matvec_rankone_test.cc 2KB
matvec_mult_test.cc 2KB
tri_solve_test.cc 2KB
matrix_mat_algo_test.cc 2KB
ranktwo_test.cc 2KB
symm_matvec_mult.cc 2KB
vec_copy.cc 2KB
sparse_matrix.cc 2KB
geev.cc 2KB
tri_solve.cc 2KB
array2D.cc 2KB
banded_view_test.cc 2KB
general_matvec_mult.cc 2KB
tri_pack_vect.cc 2KB
swap_rows.cc 2KB
partition.cc 2KB
ssor.cc 2KB
gecon.cc 2KB
max_index.cc 2KB
vec_scale.cc 2KB
apply_givens.cc 2KB
blocked_matrix.cc 2KB
dot_prod.cc 2KB
quick_test.cc 2KB
external_matrix.cc 1KB
symm_packed_vec_prod.cc 1KB
symm_sparse_vec_prod.cc 1KB
symm_banded_vec_prod.cc 1KB
sparse_mult_col.cc 1KB
kiester_geev.cc 1KB
sparse_mult.cc 1KB
rank_1_symm_sparse.cc 1KB
gather_scatter.cc 1KB
banded_matmat.cc 1KB
rank_1_gen_mat.cc 1KB
rank_one.cc 1KB
lu_factorization.cc 1KB
tri_pack_sol.cc 1012B
trans_mult.cc 968B
tri_band_sol.cc 961B
tri_band_vect.cc 950B
sparse_vec_prod.cc 916B
sparse_tri_solve.cc 855B
tri_matvec_mult.cc 846B
subrange_vector.cc 836B
y_ax_y.cc 689B
range.cc 595B
neg_stride.cc 584B
blocked_vector.cc 503B
transpose.cc 408B
euclid_norm.cc 408B
abs_sum.cc 391B
resize.cc 344B
vecvec_swap.cc 334B
vecvec_copy.cc 318B
vecvec_ele_mult.cc 307B
vecvec_add3.cc 301B
vecvec_add.cc 295B
vecvec_ele_div.cc 283B
vec_max_index.cc 271B
vecvec_dot.cc 262B
vec_min.cc 254B
vec_two_norm.cc 253B
vec_max.cc 251B
共 211 条
- 1
- 2
- 3
资源评论
pobudeyi
- 粉丝: 28
- 资源: 67
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- electron-v32.2.5-win32-x64资源包
- 日历组件使用········
- java班级管理系统(java毕业设计源码).zip
- bochb_assist_2.0.0.apk
- java无线点餐系统源码数据库 MySQL源码类型 WebForm
- 简历模板嵌入式常用知识&面试题库200M
- 常用基础元件的PCB封装库SchLib/IntLib通用原理图库接插件-脚距3.96
- 常用基础元件的PCB封装库SchLib/IntLib通用原理图库STM32 F2系列单片机
- 常用基础元件的PCB封装库SchLib/IntLib通用原理图库PIC系列单片机
- java通用后台管理系统源码数据库 MySQL源码类型 WebForm
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功