Kindly tell me the function of matrix multiplication in GSL library. I have searched a lot but I am not be able to fine it. If any one know about that function kindly answer. Thanks in advance.
More precisely, the element accessed by the function gsl_matrix_get (m,i,j) and gsl_matrix_set (m,i,j,x) is: where tda is the physical row-length of the matrix. This function returns the -th element of a matrix m.
If the matrix was created using gsl_matrix_alloc () then the block underlying the matrix will also be deallocated. If the matrix has been created from another object then the memory is still owned by that object and will not be deallocated. The functions for accessing the elements of a matrix use the same range checking system as vectors.
The matrix m is not required to be square. For a rectangular matrix the length of the diagonal is the same as the smaller dimension of the matrix. The function gsl_matrix_const_diagonal () is equivalent to gsl_matrix_diagonal () but can be used for matrices which are declared const.
The gsl_matrix structure is very simple and looks like this: Matrices are stored in row-major order, meaning that each row of elements forms a contiguous block in memory. This is the standard “C-language ordering” of two-dimensional arrays. Note that Fortran stores arrays in column-major order. The number of rows is size1 .
I think you'll want to use the gemm
family of functions, such as gsl_blas_sgemm()
. Just set the scalars to one and the added matrix to zero. An example is here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With