gf_spmat_get
Purpose
Synopsis
ivec gf_spmat_get(M,'size') int gf_spmat_get(M,'nnz') int gf_spmat_get(M,'is_complex') string S=gf_spmat_get(M,'storage') mat fM=gf_spmat_get(M,'full'[,I [,J]]) vec tMV=gf_spmat_get(M,'mult', V) vec MV=gf_spmat_get(M,'tmult', V) vec D=gf_spmat_get(M,'diag'[, E]) [ivec JC,ivec IR]=gf_spmat_get(M,'csc_ind') [vec V]=gf_spmat_get(M,'csc_val') [spmat N, vec U0]=gf_spmat_get(H,'dirichlet_nullspace', @vec R) string S=gf_spmat_get(sl,'info')gf_spmat_get(sl,'save', string format, string filename)
Description
gf_spmat_get(M,'size') : return a vector [ni, nj] where ni and nj are the dimensions of the matrix.
gf_spmat_get(M,'nnz') : return the number of non-null values stored in the sparse matrix.
gf_spmat_get(M,'is_complex') : return 1 if the matrix contains complex values.
gf_spmat_get(M,'storage') : return the storage type currently used for the matrix. The storage is returned as a string, either 'CSC' or 'WSC'.
gf_spmat_get(M,'full'[,I [,J]]) : return a full (sub-)matrix of M. The optional arguments I, are the sub- intervals for the rows and columns that are to be extracted.
gf_spmat_get(M,'mult', V) : give the product of the sparse matrix K with a vector V. For matrix-matrix multiplications, see gf_spmat('mult')
gf_spmat_get(M,'tmult', V) give the product of M transposed (conjugated if M is complex) with the vector V.
gf_spmat_get(M,'diag'[, E]) : return the diagonal of M as a vector. If E is used, return the sub-diagonals whose ranks are given in E.
[JC,IR]=gf_spmat_get(M,'csc_ind') : return the two usual index arrays of CSC storage. If K is not stored as a CSC matrix, it is converted into CSC.
[V]=gf_spmat_get(M,'csc_val') : return the array of values of all non-zero entries of M. If M is not stored as a CSC matrix, it is converted into CSC.
[N,U0]=gf_spmat_get(H,'dirichlet_nullspace', @vec R) : solve the (under-determined) linear system HU=R. A solution U0 which has a minimum L2-norm is returned, with a sparse matrix N containing an orthogonal basis of the kernel of the constraints matrix H : the initial problem KU = B with constraints HU=R is replaced by (N'*K*N)*UU = N'*B and the solution is U = N*UU + U0.
S=gf_spmat_get(sl,'info') : return a string contains a short summary on the sparse matrix (dimensions, filling, ..).
gf_spmat_get(sl,'save', string format, string filename) : export the sparse matrix. The format of the file may be 'hb' for Harwell- Boeing, or 'mm' for Matrix-Market.
