HLIBpro
3.0
|
Admissibility condition | |
hpro_ admcond_t hpro_s_ | admcond_alg (const hpro_ adm_t crit, const double eta, const hpro_s_ matrix_t S, const hpro_ permutation_t row_perm, const hpro_ permutation_t col_perm, int *info) |
Cluster Trees | |
hpro_ clustertree_t hpro_s_ | clt_build_bsp_nd (const hpro_ coord_t coord, const hpro_s_ matrix_t S, const hpro_ bsp_t bsptype, const unsigned int nmin, int *info) |
hpro_ clustertree_t hpro_s_ | clt_build_alg (const hpro_s_ matrix_t S, const hpro_ alg_t algtype, const unsigned int nmin, int *info) |
hpro_ clustertree_t hpro_s_ | clt_build_alg_nd (const hpro_s_ matrix_t S, const hpro_ alg_t algtype, const unsigned int nmin, int *info) |
hpro_ clustertree_t hpro_s_ | clt_build_alg_part (const hpro_s_ matrix_t S, const unsigned int *partition, const hpro_ alg_t algtype, const unsigned int nmin, int *info) |
Vectors | |
size_t hpro_s_ | vector_size (const hpro_s_ vector_t v, int *info) |
hpro_s_ vector_t hpro_s_ | vector_copy (const hpro_s_ vector_t v, int *info) |
size_t hpro_s_ | vector_bytesize (const hpro_s_ vector_t v, int *info) |
void hpro_s_ | vector_free (hpro_s_ vector_t v, int *info) |
float hpro_s_ | vector_entry_get (const hpro_s_ vector_t x, const size_t i, int *info) |
void hpro_s_ | vector_entry_set (const hpro_s_ vector_t x, const size_t i, const float f, int *info) |
hpro_s_ vector_t hpro_s_ | vector_build (const size_t size, int *info) |
void hpro_s_ | vector_import (hpro_s_ vector_t v, const float *arr, int *info) |
void hpro_s_ | vector_export (const hpro_s_ vector_t v, float *arr, int *info) |
void hpro_s_ | vector_fill (hpro_s_ vector_t x, const float f, int *info) |
void hpro_s_ | vector_fill_rand (hpro_s_ vector_t x, int *info) |
void hpro_s_ | vector_assign (hpro_s_ vector_t y, const hpro_s_ vector_t x, int *info) |
void hpro_s_ | vector_scale (hpro_s_ vector_t x, const float f, int *info) |
void hpro_s_ | vector_axpy (const float alpha, const hpro_s_ vector_t x, hpro_s_ vector_t y, int *info) |
float hpro_s_ | vector_dot (const hpro_s_ vector_t x, const hpro_s_ vector_t y, int *info) |
float hpro_s_ | vector_norm2 (const hpro_s_ vector_t x, int *info) |
float hpro_s_ | vector_norm_inf (const hpro_s_ vector_t x, int *info) |
void hpro_s_ | vector_permute (hpro_s_ vector_t v, const hpro_ permutation_t perm, int *info) |
Matrices | |
void hpro_s_ | linearoperator_free (hpro_s_ linearoperator_t A, int *info) |
hpro_s_ vector_t hpro_s_ | linearoperator_range_vector (const hpro_s_ linearoperator_t A, int *info) |
hpro_s_ vector_t hpro_s_ | linearoperator_domain_vector (const hpro_s_ linearoperator_t A, int *info) |
hpro_s_ linearoperator_t hpro_s_ | perm_linearoperator (const hpro_ permutation_t P, const hpro_s_ linearoperator_t A, const hpro_ permutation_t R, int *info) |
void hpro_s_ | linearoperator_apply (const hpro_s_ linearoperator_t A, const hpro_s_ vector_t x, hpro_s_ vector_t y, const hpro_ matop_t matop, int *info) |
void hpro_s_ | linearoperator_apply_add (const float alpha, const hpro_s_ linearoperator_t A, const hpro_s_ vector_t x, hpro_s_ vector_t y, const hpro_ matop_t matop, int *info) |
size_t hpro_s_ | matrix_rows (const hpro_s_ matrix_t A, int *info) |
size_t hpro_s_ | matrix_cols (const hpro_s_ matrix_t A, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_copy (const hpro_s_ matrix_t A, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_copy_acc (const hpro_s_ matrix_t A, const hpro_ acc_t acc, const int coarsen, int *info) |
void hpro_s_ | matrix_copyto (const hpro_s_ matrix_t A, hpro_s_ matrix_t B, int *info) |
void hpro_s_ | matrix_copyto_acc (const hpro_s_ matrix_t A, hpro_s_ matrix_t B, const hpro_ acc_t acc, const int coarsen, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_copy_blockdiag (const hpro_s_ matrix_t A, const unsigned int lvl, const size_t blocksize, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_copy_blockdiag_acc (const hpro_s_ matrix_t A, const hpro_ acc_t acc, const unsigned int lvl, const size_t blocksize, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_copy_nearfield (const hpro_s_ matrix_t A, const int without_farfield, int *info) |
void hpro_s_ | matrix_restrict_nearfield (hpro_s_ matrix_t A, const int delete_farfield, int *info) |
void hpro_s_ | matrix_nearfield_to_crs (const hpro_s_ matrix_t A, size_t *nnz, int **rowptr, int **colind, float **coeffs, int *info) |
size_t hpro_s_ | matrix_bytesize (const hpro_s_ matrix_t A, int *info) |
void hpro_s_ | matrix_free (hpro_s_ matrix_t A, int *info) |
int hpro_s_ | matrix_is_sym (const hpro_s_ matrix_t A, int *info) |
int hpro_s_ | matrix_is_herm (const hpro_s_ matrix_t A, int *info) |
int hpro_s_ | matrix_is_complex (const hpro_s_ matrix_t A, int *info) |
float hpro_s_ | matrix_entry_get (const hpro_s_ matrix_t A, const size_t i, const size_t j, int *info) |
hpro_s_ vector_t hpro_s_ | matrix_row_vector (const hpro_s_ matrix_t A, int *info) |
hpro_s_ vector_t hpro_s_ | matrix_col_vector (const hpro_s_ matrix_t A, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_import_crs (const size_t rows, const size_t cols, const size_t nnz, const int *rowptr, const int *colind, const float *coeffs, const int sym, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_import_ccs (const size_t rows, const size_t cols, const size_t nnz, const int *colptr, const int *rowind, const float *coeffs, const int sym, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_import_dense (const size_t rows, const size_t cols, const float *D, const int sym, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_build_sparse (const hpro_ blockclustertree_t bct, const hpro_s_ matrix_t S, const hpro_ acc_t acc, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_build_dense (const hpro_ blockclustertree_t bct, const hpro_s_ matrix_t D, const hpro_ lrapx_t lrapx, const hpro_ acc_t acc, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_build_coeff (const hpro_ blockclustertree_t bct, const hpro_s_ coeff_t f, void *arg, const hpro_ lrapx_t lrapx, const hpro_ acc_t acc, const int sym, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_build_identity (const hpro_ blockclustertree_t bct, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_assemble_block (const size_t brows, const size_t bcols, hpro_s_ matrix_t *submat, const int copy, int *info) |
hpro_ permutation_t hpro_s_ | matrix_row_perm_i2e (const hpro_s_ matrix_t A, int *info) |
hpro_ permutation_t hpro_s_ | matrix_col_perm_i2e (const hpro_s_ matrix_t A, int *info) |
hpro_ permutation_t hpro_s_ | matrix_row_perm_e2i (const hpro_s_ matrix_t A, int *info) |
hpro_ permutation_t hpro_s_ | matrix_col_perm_e2i (const hpro_s_ matrix_t A, int *info) |
void hpro_s_ | matrix_permute (hpro_s_ matrix_t A, const hpro_ permutation_t row_perm, const hpro_ permutation_t col_perm, int *info) |
hpro_s_ linearoperator_t hpro_s_ | perm_matrix (const hpro_ permutation_t P, const hpro_s_ matrix_t A, const hpro_ permutation_t R, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_product2 (const hpro_ matop_t matop1, const hpro_s_ linearoperator_t A1, const hpro_ matop_t matop2, const hpro_s_ linearoperator_t A2, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_product3 (const hpro_ matop_t matop1, const hpro_s_ linearoperator_t A1, const hpro_ matop_t matop2, const hpro_s_ linearoperator_t A2, const hpro_ matop_t matop3, const hpro_s_ linearoperator_t A3, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_sum2 (const float alpha1, const hpro_ matop_t matop1, const hpro_s_ linearoperator_t A1, const float alpha2, const hpro_ matop_t matop2, const hpro_s_ linearoperator_t A2, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_sum3 (const float alpha1, const hpro_ matop_t matop1, const hpro_s_ linearoperator_t A1, const float alpha2, const hpro_ matop_t matop2, const hpro_s_ linearoperator_t A2, const float alpha3, const hpro_ matop_t matop3, const hpro_s_ linearoperator_t A3, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_to_dense (const hpro_s_ matrix_t A, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_to_rank (const hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_approx_rank_aca (const hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
void hpro_s_ | matrix_print_ps (const hpro_s_ matrix_t A, const char *filename, const int options, int *info) |
Algebra | |
void hpro_s_ | matrix_mulvec (const float alpha, const hpro_s_ matrix_t A, const hpro_s_ vector_t x, const float beta, hpro_s_ vector_t y, const hpro_ matop_t matop, int *info) |
void hpro_s_ | matrix_transpose (const hpro_s_ matrix_t A, int *info) |
void hpro_s_ | matrix_scale (const float f, const hpro_s_ matrix_t A, int *info) |
void hpro_s_ | matrix_add (const float alpha, const hpro_s_ matrix_t A, const float beta, hpro_s_ matrix_t B, const hpro_ acc_t acc, int *info) |
void hpro_s_ | matrix_mul (const float alpha, const hpro_ matop_t matop_A, const hpro_s_ matrix_t A, const hpro_ matop_t matop_B, const hpro_s_ matrix_t B, const float beta, hpro_s_ matrix_t C, const hpro_ acc_t acc, int *info) |
hpro_s_ matrix_t hpro_s_ | matrix_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ vector_t hpro_s_ | matrix_inv_diag (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_factorise (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_factorise_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_lu (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_ldl (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_ll (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_chol (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_waz (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_lu_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_ldl_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_ll_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
hpro_s_ linearoperator_t hpro_s_ | matrix_chol_inv (hpro_s_ matrix_t A, const hpro_ acc_t acc, int *info) |
void hpro_s_ | matrix_solve_lower_left (const hpro_s_ matrix_t L, const hpro_ matop_t op_L, hpro_s_ matrix_t A, const hpro_ acc_t acc, const int pointwise, const int unit_diag, int *info) |
void hpro_s_ | matrix_solve_lower_right (hpro_s_ matrix_t A, const hpro_s_ matrix_t L, const hpro_ matop_t op_L, const hpro_ acc_t acc, const int pointwise, const int unit_diag, int *info) |
void hpro_s_ | matrix_solve_upper_right (hpro_s_ matrix_t A, const hpro_s_ matrix_t U, const hpro_ acc_t acc, const int pointwise, const int unit_diag, int *info) |
void hpro_s_ | matrix_solve_diag_left (const hpro_s_ matrix_t D, const hpro_ matop_t op_D, hpro_s_ matrix_t A, const hpro_ acc_t acc, const int pointwise, int *info) |
void hpro_s_ | matrix_solve_diag_right (hpro_s_ matrix_t A, const hpro_s_ matrix_t D, const hpro_ matop_t op_D, const hpro_ acc_t acc, const int pointwise, int *info) |
void hpro_s_ | matrix_add_identity (hpro_s_ matrix_t A, const float lambda, int *info) |
float hpro_s_ | matrix_norm_frobenius (const hpro_s_ matrix_t A, int *info) |
float hpro_s_ | matrix_norm_frobenius_diff (const hpro_s_ matrix_t A, const hpro_s_ matrix_t B, int *info) |
float hpro_s_ | matrix_norm_spectral (const hpro_s_ matrix_t A, int *info) |
float hpro_s_ | matrix_norm_spectral_inv (const hpro_s_ matrix_t A, int *info) |
float hpro_s_ | matrix_norm_spectral_diff (const hpro_s_ matrix_t A, const hpro_s_ matrix_t B, int *info) |
float hpro_s_ | matrix_norm_inv_approx (const hpro_s_ matrix_t A, const hpro_s_ matrix_t B, int *info) |
float hpro_s_ | linearoperator_norm_spectral (const hpro_s_ linearoperator_t A, int *info) |
float hpro_s_ | linearoperator_norm_spectral_inv (const hpro_s_ linearoperator_t A, int *info) |
float hpro_s_ | linearoperator_norm_spectral_diff (const hpro_s_ linearoperator_t A, const hpro_s_ linearoperator_t B, int *info) |
float hpro_s_ | linearoperator_norm_inv_approx (const hpro_s_ linearoperator_t A, const hpro_s_ linearoperator_t B, int *info) |
Solver | |
void hpro_s_ | solver_solve (const hpro_ solver_t solver, const hpro_s_ linearoperator_t A, hpro_s_ vector_t x, const hpro_s_ vector_t b, const hpro_s_ linearoperator_t W, hpro_ solve_info_t *solve_info, int *info) |
Input/Output | |
hpro_s_ matrix_t hpro_s_ | hformat_load_matrix (const char *filename, int *info) |
hpro_s_ linearoperator_t hpro_s_ | hformat_load_linearoperator (const char *filename, int *info) |
hpro_s_ vector_t hpro_s_ | hformat_load_vector (const char *filename, int *info) |
void hpro_s_ | hformat_save_linearoperator (const hpro_s_ linearoperator_t A, const char *filename, int *info) |
void hpro_s_ | hformat_save_matrix (const hpro_s_ matrix_t A, const char *filename, int *info) |
void hpro_s_ | hformat_save_vector (const hpro_s_ vector_t v, const char *filename, int *info) |
hpro_s_ matrix_t hpro_s_ | samg_load_matrix (const char *filename, int *info) |
void hpro_s_ | samg_save_matrix (const hpro_s_ matrix_t A, const char *filename, int *info) |
hpro_s_ vector_t hpro_s_ | samg_load_vector (const char *filename, int *info) |
void hpro_s_ | samg_save_vector (const hpro_s_ vector_t x, const char *filename, int *info) |
hpro_s_ matrix_t hpro_s_ | matlab_load_matrix (const char *filename, const char *matname, int *info) |
void hpro_s_ | matlab_save_matrix (const hpro_s_ matrix_t M, const char *filename, const char *matname, int *info) |
hpro_s_ vector_t hpro_s_ | matlab_load_vector (const char *filename, const char *vecname, int *info) |
void hpro_s_ | matlab_save_vector (const hpro_s_ vector_t v, const char *filename, const char *vecname, int *info) |
hpro_s_ matrix_t hpro_s_ | pltmg_load_matrix (const char *filename, int *info) |
hpro_s_ matrix_t hpro_s_ | hb_load_matrix (const char *filename, int *info) |
void hpro_s_ | hb_save_matrix (const hpro_s_ matrix_t M, const char *filename, int *info) |
hpro_s_ matrix_t hpro_s_ | mm_load_matrix (const char *filename, int *info) |
hpro_s_ matrix_t hpro_s_ | load_matrix (const char *filename, int *info) |
hpro_s_ vector_t hpro_s_ | load_vector (const char *filename, int *info) |
This modules defines single precision real valued functions for the usage of 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 in C programs.
hpro_ admcond_t hpro_s_ admcond_alg | ( | const hpro_ adm_t | crit, |
const double | eta, | ||
const hpro_s_ matrix_t | S, | ||
const hpro_ permutation_t | row_perm, | ||
const hpro_ permutation_t | col_perm, | ||
int * | info | ||
) |
create admissibility condition based on algebraic connectivity in S
hpro_ clustertree_t hpro_s_ clt_build_alg | ( | const hpro_s_ matrix_t | S, |
const hpro_ alg_t | algtype, | ||
const unsigned int | nmin, | ||
int * | info | ||
) |
build clustertree via algebraic clustering based on given sparse matrix S and partitioning type algtype.
hpro_ clustertree_t hpro_s_ clt_build_alg_nd | ( | const hpro_s_ matrix_t | S, |
const hpro_ alg_t | algtype, | ||
const unsigned int | nmin, | ||
int * | info | ||
) |
build clustertree via algebraic clustering with nested dissection based on given sparse matrix S and partitioning type algtype.
hpro_ clustertree_t hpro_s_ clt_build_alg_part | ( | const hpro_s_ matrix_t | S, |
const unsigned int * | partition, | ||
const hpro_ alg_t | algtype, | ||
const unsigned int | nmin, | ||
int * | info | ||
) |
build clustertree via algebraic clustering based on matrix S and use a predefined partition for first step
hpro_ clustertree_t hpro_s_ clt_build_bsp_nd | ( | const hpro_ coord_t | coord, |
const hpro_s_ matrix_t | S, | ||
const hpro_ bsp_t | bsptype, | ||
const unsigned int | nmin, | ||
int * | info | ||
) |
build cluster tree using binary space partitioning and nested dissection based on given sparse matrix S
coord | coordinates of indices |
S | sparse mat. for connectivity |
bsptype | partitioning type |
nmin | minimal cluster size |
hpro_s_ matrix_t hpro_s_ hb_load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
void hpro_s_ hb_save_matrix | ( | const hpro_s_ matrix_t | M, |
const char * | filename, | ||
int * | info | ||
) |
save matrix M to file filename
hpro_s_ linearoperator_t hpro_s_ hformat_load_linearoperator | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
hpro_s_ matrix_t hpro_s_ hformat_load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
hpro_s_ vector_t hpro_s_ hformat_load_vector | ( | const char * | filename, |
int * | info | ||
) |
read vector from file filename
void hpro_s_ hformat_save_linearoperator | ( | const hpro_s_ linearoperator_t | A, |
const char * | filename, | ||
int * | info | ||
) |
save linear operator A to file filename
void hpro_s_ hformat_save_matrix | ( | const hpro_s_ matrix_t | A, |
const char * | filename, | ||
int * | info | ||
) |
save matrix A to file filename
void hpro_s_ hformat_save_vector | ( | const hpro_s_ vector_t | v, |
const char * | filename, | ||
int * | info | ||
) |
save vector v to file filename
void hpro_s_ linearoperator_apply | ( | const hpro_s_ linearoperator_t | A, |
const hpro_s_ vector_t | x, | ||
hpro_s_ vector_t | y, | ||
const hpro_ matop_t | matop, | ||
int * | info | ||
) |
computes \( y := op(A) \cdot x \)
void hpro_s_ linearoperator_apply_add | ( | const float | alpha, |
const hpro_s_ linearoperator_t | A, | ||
const hpro_s_ vector_t | x, | ||
hpro_s_ vector_t | y, | ||
const hpro_ matop_t | matop, | ||
int * | info | ||
) |
computes \( y := y + \alpha op(A) \cdot x \)
hpro_s_ vector_t hpro_s_ linearoperator_domain_vector | ( | const hpro_s_ linearoperator_t | A, |
int * | info | ||
) |
create vectors from the domain of the linear operator A
void hpro_s_ linearoperator_free | ( | hpro_s_ linearoperator_t | A, |
int * | info | ||
) |
free resources coupled with linear operator A
float hpro_s_ linearoperator_norm_inv_approx | ( | const hpro_s_ linearoperator_t | A, |
const hpro_s_ linearoperator_t | B, | ||
int * | info | ||
) |
compute inversion error |I-BA|_2, where B is supposed to be A^-1
float hpro_s_ linearoperator_norm_spectral | ( | const hpro_s_ linearoperator_t | A, |
int * | info | ||
) |
compute spectral norm of matrix
float hpro_s_ linearoperator_norm_spectral_diff | ( | const hpro_s_ linearoperator_t | A, |
const hpro_s_ linearoperator_t | B, | ||
int * | info | ||
) |
compute relative spectral norm of A-B, e.g. |A-B|_2/|A|_2
float hpro_s_ linearoperator_norm_spectral_inv | ( | const hpro_s_ linearoperator_t | A, |
int * | info | ||
) |
compute spectral norm of inverse matrix
hpro_s_ vector_t hpro_s_ linearoperator_range_vector | ( | const hpro_s_ linearoperator_t | A, |
int * | info | ||
) |
create vectors from the range of the linear operator A
hpro_s_ matrix_t hpro_s_ load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
hpro_s_ vector_t hpro_s_ load_vector | ( | const char * | filename, |
int * | info | ||
) |
read vector from file filename
hpro_s_ matrix_t hpro_s_ matlab_load_matrix | ( | const char * | filename, |
const char * | matname, | ||
int * | info | ||
) |
read matrix named matname in Matlab V7 format from file filename; if matname == NULL or matname == "", the first matrix in filename will be read
hpro_s_ vector_t hpro_s_ matlab_load_vector | ( | const char * | filename, |
const char * | vecname, | ||
int * | info | ||
) |
read vector named vname from file filename in Matlab V7 format
void hpro_s_ matlab_save_matrix | ( | const hpro_s_ matrix_t | M, |
const char * | filename, | ||
const char * | matname, | ||
int * | info | ||
) |
save matrix M named matname in Matlab V7 format to file filename
void hpro_s_ matlab_save_vector | ( | const hpro_s_ vector_t | v, |
const char * | filename, | ||
const char * | vecname, | ||
int * | info | ||
) |
save vector named vname to file filename in Matlab V7 format
void hpro_s_ matrix_add | ( | const float | alpha, |
const hpro_s_ matrix_t | A, | ||
const float | beta, | ||
hpro_s_ matrix_t | B, | ||
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
compute B := alpha A + beta B with block-wise precision acc
void hpro_s_ matrix_add_identity | ( | hpro_s_ matrix_t | A, |
const float | lambda, | ||
int * | info | ||
) |
compute A := A + lambda I
hpro_s_ matrix_t hpro_s_ matrix_approx_rank_aca | ( | const hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
convert matrix to lowrank format using approximation by ACA with accuracy defined by acc
hpro_s_ matrix_t hpro_s_ matrix_assemble_block | ( | const size_t | brows, |
const size_t | bcols, | ||
hpro_s_ matrix_t * | submat, | ||
const int | copy, | ||
int * | info | ||
) |
assemble brows × bcols block matrix out of sub blocks submat
\begin{eqnarray*} A_{00} & A_{01} \\ A_{10} & A_{11} \end{eqnarray*}
is stored { A_00, A_10, A_01, A_11 },brows | number of block rows |
bcols | number of block columns |
submat | array of sub matrices |
copy | copy matrices if true |
hpro_s_ matrix_t hpro_s_ matrix_build_coeff | ( | const hpro_ blockclustertree_t | bct, |
const hpro_s_ coeff_t | f, | ||
void * | arg, | ||
const hpro_ lrapx_t | lrapx, | ||
const hpro_ acc_t | acc, | ||
const int | sym, | ||
int * | info | ||
) |
build H-matrix over block cluster tree bct of precision acc out of dense matrix given by a matrix coefficient function f by using a low-rank approximation for admissible blocks
bct | block ct. defining indexsets |
f | coeff. function defining mat. |
arg | add. argument to coeff. fn. |
lrapx | low-rank approximation method |
acc | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
hpro_s_ matrix_t hpro_s_ matrix_build_dense | ( | const hpro_ blockclustertree_t | bct, |
const hpro_s_ matrix_t | D, | ||
const hpro_ lrapx_t | lrapx, | ||
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
build H-matrix over block cluster tree bct with contents defined by given dense matrix D with low-rank approximation method lrapx and block-wise accuracy acc
bct | block ct. defining indexsets |
D | dense mat. to be converted |
lrapx | low-rank approximation method |
acc | accuracy of the approximation |
hpro_s_ matrix_t hpro_s_ matrix_build_identity | ( | const hpro_ blockclustertree_t | bct, |
int * | info | ||
) |
build H-matrix over block cluster tree bct representing identity
hpro_s_ matrix_t hpro_s_ matrix_build_sparse | ( | const hpro_ blockclustertree_t | bct, |
const hpro_s_ matrix_t | S, | ||
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
build H-matrix over block cluster tree bct with contents defined by given sparse matrix S
bct | block ct. defining indexsets |
S | sparse mat. to be converted |
acc | accuracy of the approximation |
size_t hpro_s_ matrix_bytesize | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return size of matrix in bytes
hpro_s_ vector_t hpro_s_ matrix_col_vector | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
create vectors matching the column indexsets of matrix A
size_t hpro_s_ matrix_cols | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return number of columns of matrix
hpro_s_ matrix_t hpro_s_ matrix_copy | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return copy of matrix A
hpro_s_ matrix_t hpro_s_ matrix_copy_acc | ( | const hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
const int | coarsen, | ||
int * | info | ||
) |
return copy of matrix A with accuracy acc; if coarsen != 0, copy is coarsend
hpro_s_ matrix_t hpro_s_ matrix_copy_blockdiag | ( | const hpro_s_ matrix_t | A, |
const unsigned int | lvl, | ||
const size_t | blocksize, | ||
int * | info | ||
) |
copy blockdiagonal part of first lvl levels or blocks of size blocksize of matrix
hpro_s_ matrix_t hpro_s_ matrix_copy_blockdiag_acc | ( | const hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
const unsigned int | lvl, | ||
const size_t | blocksize, | ||
int * | info | ||
) |
copy blockdiagonal part of first lvl levels or blocks of size blocksize of matrix with given accuracy acc
hpro_s_ matrix_t hpro_s_ matrix_copy_nearfield | ( | const hpro_s_ matrix_t | A, |
const int | without_farfield, | ||
int * | info | ||
) |
copy nearfield part of matrix
void hpro_s_ matrix_copyto | ( | const hpro_s_ matrix_t | A, |
hpro_s_ matrix_t | B, | ||
int * | info | ||
) |
copy matrix A to B
void hpro_s_ matrix_copyto_acc | ( | const hpro_s_ matrix_t | A, |
hpro_s_ matrix_t | B, | ||
const hpro_ acc_t | acc, | ||
const int | coarsen, | ||
int * | info | ||
) |
copy matrix A to B with accuracy acc; if coarsen != 0, B is coarsend
float hpro_s_ matrix_entry_get | ( | const hpro_s_ matrix_t | A, |
const size_t | i, | ||
const size_t | j, | ||
int * | info | ||
) |
get single entry at position (i,j) in matrix A
hpro_s_ linearoperator_t hpro_s_ matrix_factorise | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
factorise matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_factorise_inv | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
same as hlib_matrix_factorise but return matrix object for evaluation of inverse of A.
void hpro_s_ matrix_free | ( | hpro_s_ matrix_t | A, |
int * | info | ||
) |
free resources coupled with matrix A
hpro_s_ matrix_t hpro_s_ matrix_import_ccs | ( | const size_t | rows, |
const size_t | cols, | ||
const size_t | nnz, | ||
const int * | colptr, | ||
const int * | rowind, | ||
const float * | coeffs, | ||
const int | sym, | ||
int * | info | ||
) |
import given real sparse matrix in CCS format into internal sparse matrix format
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
colptr | array of column pointers |
rowind | array of row indices |
coeffs | array of matrix coefficients |
sym | if non-zero, matrix is sym. |
hpro_s_ matrix_t hpro_s_ matrix_import_crs | ( | const size_t | rows, |
const size_t | cols, | ||
const size_t | nnz, | ||
const int * | rowptr, | ||
const int * | colind, | ||
const float * | coeffs, | ||
const int | sym, | ||
int * | info | ||
) |
import given real sparse matrix in CRS format into internal sparse matrix format
rows | number of rows and |
cols | columns of the matrix |
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coefficients |
sym | if non-zero, matrix is sym. |
hpro_s_ matrix_t hpro_s_ matrix_import_dense | ( | const size_t | rows, |
const size_t | cols, | ||
const float * | D, | ||
const int | sym, | ||
int * | info | ||
) |
import given real dense matrix in column major format into internal dense matrix format
rows | number of rows and |
cols | columns of the matrix |
D | accuracy of the approximation |
sym | if non-zero, matrix is sym. |
compute inverse of A with block-wise precision acc; A will be overwritten with A^-1 upon exit
compute diagonal of inverse of A with local accuracy acc
int hpro_s_ matrix_is_complex | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return 1 if matrix A is complex valued and 0 otherwise
int hpro_s_ matrix_is_herm | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return 1 if matrix A is hermitian, e.g. A = A^H
int hpro_s_ matrix_is_sym | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return 1 if matrix A is symmetric, e.g. A = A^T
hpro_s_ linearoperator_t hpro_s_ matrix_ldl | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
LDL factorisation of matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_ldl_inv | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
LDL factorisation of matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_ll | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
Cholesky factorisation of matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_ll_inv | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
Cholesky factorisation of matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_lu | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
LU factorise matrix A up to block-wise precision acc
hpro_s_ linearoperator_t hpro_s_ matrix_lu_inv | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
LU factorise matrix A up to block-wise precision acc
void hpro_s_ matrix_mul | ( | const float | alpha, |
const hpro_ matop_t | matop_A, | ||
const hpro_s_ matrix_t | A, | ||
const hpro_ matop_t | matop_B, | ||
const hpro_s_ matrix_t | B, | ||
const float | beta, | ||
hpro_s_ matrix_t | C, | ||
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
compute C := alpha op(A) op(B) + beta C with block-wise precision acc
void hpro_s_ matrix_mulvec | ( | const float | alpha, |
const hpro_s_ matrix_t | A, | ||
const hpro_s_ vector_t | x, | ||
const float | beta, | ||
hpro_s_ vector_t | y, | ||
const hpro_ matop_t | matop, | ||
int * | info | ||
) |
compute y := alpha op(A) x + beta y, where op(A) is either A or A^T
x | source vector of dimension columns(op(A)) |
y | dest. vector of dimension rows(op(A)) |
matop | matrix operation, e.g. transpose |
void hpro_s_ matrix_nearfield_to_crs | ( | const hpro_s_ matrix_t | A, |
size_t * | nnz, | ||
int ** | rowptr, | ||
int ** | colind, | ||
float ** | coeffs, | ||
int * | info | ||
) |
returns nearfield part of given matrix in CRS format
nnz | number of non-zero coeff. |
rowptr | array of row pointers |
colind | array of column indices |
coeffs | array of matrix coefficients |
float hpro_s_ matrix_norm_frobenius | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
compute Frobenius norm of matrix
float hpro_s_ matrix_norm_frobenius_diff | ( | const hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | B, | ||
int * | info | ||
) |
compute Frobenius norm of A-B
float hpro_s_ matrix_norm_inv_approx | ( | const hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | B, | ||
int * | info | ||
) |
compute inversion error |I-BA|_2, where B is supposed to be A^-1
float hpro_s_ matrix_norm_spectral | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
compute spectral norm of matrix
float hpro_s_ matrix_norm_spectral_diff | ( | const hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | B, | ||
int * | info | ||
) |
compute relative spectral norm of A-B, e.g. |A-B|_2/|A|_2
float hpro_s_ matrix_norm_spectral_inv | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
compute spectral norm of inverse matrix
void hpro_s_ matrix_permute | ( | hpro_s_ matrix_t | A, |
const hpro_ permutation_t | row_perm, | ||
const hpro_ permutation_t | col_perm, | ||
int * | info | ||
) |
reorder matrix A entries with given row and column permutations
void hpro_s_ matrix_print_ps | ( | const hpro_s_ matrix_t | A, |
const char * | filename, | ||
const int | options, | ||
int * | info | ||
) |
print matrix A in postscript format to file filename options (may be ORed) :
options | options defining output |
hpro_s_ linearoperator_t hpro_s_ matrix_product2 | ( | const hpro_ matop_t | matop1, |
const hpro_s_ linearoperator_t | A1, | ||
const hpro_ matop_t | matop2, | ||
const hpro_s_ linearoperator_t | A2, | ||
int * | info | ||
) |
represents product of matrices \(A_1 \cdot A_2\)
hpro_s_ linearoperator_t hpro_s_ matrix_product3 | ( | const hpro_ matop_t | matop1, |
const hpro_s_ linearoperator_t | A1, | ||
const hpro_ matop_t | matop2, | ||
const hpro_s_ linearoperator_t | A2, | ||
const hpro_ matop_t | matop3, | ||
const hpro_s_ linearoperator_t | A3, | ||
int * | info | ||
) |
represents product of matrices \(A_1 \cdot A_2 \cdot A3\)
void hpro_s_ matrix_restrict_nearfield | ( | hpro_s_ matrix_t | A, |
const int | delete_farfield, | ||
int * | info | ||
) |
restrict given matrix to nearfield part
hpro_ permutation_t hpro_s_ matrix_row_perm_e2i | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return mapping from external (user) to internal (in H-matrix) ordering for rows and columns.
hpro_ permutation_t hpro_s_ matrix_row_perm_i2e | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return mapping from internal (in H-matrix) to external (user) ordering for rows and columns.
hpro_s_ vector_t hpro_s_ matrix_row_vector | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
create vectors matching the row indexsets of matrix A
size_t hpro_s_ matrix_rows | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
return number of rows of matrix
void hpro_s_ matrix_scale | ( | const float | f, |
const hpro_s_ matrix_t | A, | ||
int * | info | ||
) |
scale matrix A by factor f
void hpro_s_ matrix_solve_diag_left | ( | const hpro_s_ matrix_t | D, |
const hpro_ matop_t | op_D, | ||
hpro_s_ matrix_t | A, | ||
const hpro_ acc_t | acc, | ||
const int | pointwise, | ||
int * | info | ||
) |
solve op(D) B = A with diagonal D and known A
void hpro_s_ matrix_solve_diag_right | ( | hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | D, | ||
const hpro_ matop_t | op_D, | ||
const hpro_ acc_t | acc, | ||
const int | pointwise, | ||
int * | info | ||
) |
solve B op(D) = A with diagonal D and known A
void hpro_s_ matrix_solve_lower_left | ( | const hpro_s_ matrix_t | L, |
const hpro_ matop_t | op_L, | ||
hpro_s_ matrix_t | A, | ||
const hpro_ acc_t | acc, | ||
const int | pointwise, | ||
const int | unit_diag, | ||
int * | info | ||
) |
solve L B = A with lower triangular L and known A
void hpro_s_ matrix_solve_lower_right | ( | hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | L, | ||
const hpro_ matop_t | op_L, | ||
const hpro_ acc_t | acc, | ||
const int | pointwise, | ||
const int | unit_diag, | ||
int * | info | ||
) |
solve B op(L) = A with lower triangular L and known A
void hpro_s_ matrix_solve_upper_right | ( | hpro_s_ matrix_t | A, |
const hpro_s_ matrix_t | U, | ||
const hpro_ acc_t | acc, | ||
const int | pointwise, | ||
const int | unit_diag, | ||
int * | info | ||
) |
solve B U = A with upper triangular U and known A
hpro_s_ linearoperator_t hpro_s_ matrix_sum2 | ( | const float | alpha1, |
const hpro_ matop_t | matop1, | ||
const hpro_s_ linearoperator_t | A1, | ||
const float | alpha2, | ||
const hpro_ matop_t | matop2, | ||
const hpro_s_ linearoperator_t | A2, | ||
int * | info | ||
) |
represents product of matrices \(A_1 + A_2\)
hpro_s_ linearoperator_t hpro_s_ matrix_sum3 | ( | const float | alpha1, |
const hpro_ matop_t | matop1, | ||
const hpro_s_ linearoperator_t | A1, | ||
const float | alpha2, | ||
const hpro_ matop_t | matop2, | ||
const hpro_s_ linearoperator_t | A2, | ||
const float | alpha3, | ||
const hpro_ matop_t | matop3, | ||
const hpro_s_ linearoperator_t | A3, | ||
int * | info | ||
) |
represents product of matrices \(A_1 + A_2 + A3\)
hpro_s_ matrix_t hpro_s_ matrix_to_dense | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
convert matrix to dense format
hpro_s_ matrix_t hpro_s_ matrix_to_rank | ( | const hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
convert matrix to lowrank format using best approximation (SVD) with truncation defined by acc
void hpro_s_ matrix_transpose | ( | const hpro_s_ matrix_t | A, |
int * | info | ||
) |
transpose matrix A
hpro_s_ linearoperator_t hpro_s_ matrix_waz | ( | hpro_s_ matrix_t | A, |
const hpro_ acc_t | acc, | ||
int * | info | ||
) |
Factorise matrix A into \(WAZ=I\), e.g., factorization of inverse of A
hpro_s_ matrix_t hpro_s_ mm_load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
hpro_s_ linearoperator_t hpro_s_ perm_linearoperator | ( | const hpro_ permutation_t | P, |
const hpro_s_ linearoperator_t | A, | ||
const hpro_ permutation_t | R, | ||
int * | info | ||
) |
represents permuted operator \(P \cdot A \cdot R\)
hpro_s_ linearoperator_t hpro_s_ perm_matrix | ( | const hpro_ permutation_t | P, |
const hpro_s_ matrix_t | A, | ||
const hpro_ permutation_t | R, | ||
int * | info | ||
) |
represents permuted matrix \(P \cdot A \cdot R\)
hpro_s_ matrix_t hpro_s_ pltmg_load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix from file filename
hpro_s_ matrix_t hpro_s_ samg_load_matrix | ( | const char * | filename, |
int * | info | ||
) |
read matrix A from file "\a filename" in SAMG format
hpro_s_ vector_t hpro_s_ samg_load_vector | ( | const char * | filename, |
int * | info | ||
) |
read vector from file filename in SAMG format
void hpro_s_ samg_save_matrix | ( | const hpro_s_ matrix_t | A, |
const char * | filename, | ||
int * | info | ||
) |
save matrix A to file "\a filename" in SAMG format
void hpro_s_ samg_save_vector | ( | const hpro_s_ vector_t | x, |
const char * | filename, | ||
int * | info | ||
) |
save vector to file filename in SAMG format
void hpro_s_ solver_solve | ( | const hpro_ solver_t | solver, |
const hpro_s_ linearoperator_t | A, | ||
hpro_s_ vector_t | x, | ||
const hpro_s_ vector_t | b, | ||
const hpro_s_ linearoperator_t | W, | ||
hpro_ solve_info_t * | solve_info, | ||
int * | info | ||
) |
solve A x = b using solver with optional preconditioning, e.g. W A x = W b if W != NULL; information about the solving process is stored in solve_info
void hpro_s_ vector_assign | ( | hpro_s_ vector_t | y, |
const hpro_s_ vector_t | x, | ||
int * | info | ||
) |
copy content of vector x to vector y x and y have to be of equal type
void hpro_s_ vector_axpy | ( | const float | alpha, |
const hpro_s_ vector_t | x, | ||
hpro_s_ vector_t | y, | ||
int * | info | ||
) |
compute y := y + a x
hpro_s_ vector_t hpro_s_ vector_build | ( | const size_t | size, |
int * | info | ||
) |
create scalar vectors of size size initialised with 0
size_t hpro_s_ vector_bytesize | ( | const hpro_s_ vector_t | v, |
int * | info | ||
) |
return size of matrix in bytes
hpro_s_ vector_t hpro_s_ vector_copy | ( | const hpro_s_ vector_t | v, |
int * | info | ||
) |
copy vectormatrix
float hpro_s_ vector_dot | ( | const hpro_s_ vector_t | x, |
const hpro_s_ vector_t | y, | ||
int * | info | ||
) |
compute dot product <x,y> = x^H * y
float hpro_s_ vector_entry_get | ( | const hpro_s_ vector_t | x, |
const size_t | i, | ||
int * | info | ||
) |
get single entry at position i in vector x
void hpro_s_ vector_entry_set | ( | const hpro_s_ vector_t | x, |
const size_t | i, | ||
const float | f, | ||
int * | info | ||
) |
set single entry at position i in vector x
void hpro_s_ vector_export | ( | const hpro_s_ vector_t | v, |
float * | arr, | ||
int * | info | ||
) |
copy data from vector v into given C arrays
void hpro_s_ vector_fill | ( | hpro_s_ vector_t | x, |
const float | f, | ||
int * | info | ||
) |
fill vector x with constant value f
void hpro_s_ vector_fill_rand | ( | hpro_s_ vector_t | x, |
int * | info | ||
) |
fill vector x with random values
void hpro_s_ vector_free | ( | hpro_s_ vector_t | v, |
int * | info | ||
) |
free resources coupled with vector v
void hpro_s_ vector_import | ( | hpro_s_ vector_t | v, |
const float * | arr, | ||
int * | info | ||
) |
copy data from C array arr into vector v
float hpro_s_ vector_norm2 | ( | const hpro_s_ vector_t | x, |
int * | info | ||
) |
compute euklidean norm of x
float hpro_s_ vector_norm_inf | ( | const hpro_s_ vector_t | x, |
int * | info | ||
) |
compute infinity norm of x
void hpro_s_ vector_permute | ( | hpro_s_ vector_t | v, |
const hpro_ permutation_t | perm, | ||
int * | info | ||
) |
reorder vector entries with given permutation
void hpro_s_ vector_scale | ( | hpro_s_ vector_t | x, |
const float | f, | ||
int * | info | ||
) |
scale vector x by f
size_t hpro_s_ vector_size | ( | const hpro_s_ vector_t | v, |
int * | info | ||
) |
return size of vectors