/*
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
没有合适的资源?快使用搜索试试~ 我知道了~
fuhction.rar_shoote8b_系统/网络安全
共692个文件
html:440个
cc:81个
h:78个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 169 浏览量
2022-09-15
01:23:48
上传
评论
收藏 1.31MB RAR 举报
温馨提示
Matrix_Template_Library rar c++矩阵模块库函数
资源推荐
资源详情
资源评论
收起资源包目录
fuhction.rar_shoote8b_系统/网络安全 (692个子文件)
alltests 297B
Makefile.am 4KB
Makefile.am 3KB
Makefile.am 2KB
Makefile.am 287B
Makefile.am 260B
Makefile.am 200B
Makefile.am 150B
Makefile.am 75B
ANNOUNCE 1KB
make_and_test.bash 7KB
iohb.c 60KB
mmio.c 11KB
math.cc 17KB
blas_interface.cc 15KB
matrix_indices_test.cc 14KB
matrix_ij_test.cc 8KB
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_add_test.cc 3KB
matmat_copy_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
sparse_matrix.cc 2KB
symm_matvec_mult.cc 2KB
vec_copy.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
gecon.cc 2KB
max_index.cc 2KB
vec_scale.cc 2KB
apply_givens.cc 2KB
blocked_matrix.cc 2KB
dot_prod.cc 2KB
banded_matmat.cc 2KB
quick_test.cc 2KB
external_matrix.cc 1KB
symm_packed_vec_prod.cc 1KB
symm_banded_vec_prod.cc 1KB
symm_sparse_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
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
euclid_norm.cc 408B
transpose.cc 408B
abs_sum.cc 391B
resize.cc 350B
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
configure 99KB
COPYLEFT 15KB
insertlic.csh 165B
grey2.gif 5KB
itl.gif 5KB
mtl2lapack.gif 4KB
共 692 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
小贝德罗
- 粉丝: 71
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功