The level 2 functions implement matrix-vector products and rank-1 and rank-2 matrix updates. Different types of matrix structure can be exploited using the conventions of section 3.1.
gemv(A, x, y[, trans=’N’[, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a general matrix:
The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha and beta are only allowed if A is complex.
symv(A, x, y[, uplo=’L’[, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a real symmetric matrix:
where A is a real symmetric matrix. The arguments A, x and y must have type ’d’ and alpha and beta must be real.
hemv(A, x, y[, uplo=’L’[, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a real symmetric or complex Hermitian matrix:
where A is real symmetric or complex Hermitian. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha and beta are only allowed if A is complex.
trmv(A, x[, uplo=’L’[, trans=’N’[, diag=’N’]]])
Matrix-vector product with a triangular matrix:
where A is square and triangular. The arguments A and x must have the same type (’d’ or ’z’).
trsv(A, x[, uplo=’L’[, trans=’N’[, diag=’N’]]])
Solution of a nonsingular triangular set of linear equations:
where A is square and triangular with nonzero diagonal elements. The arguments A and x must have the same type (’d’ or ’z’).
gbmv(A, m, kl, x, y[, trans=’N’ [, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a general band matrix:
where A is a rectangular band matrix with m rows and kl subdiagonals. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha and beta are only allowed if A is complex.
sbmv(A, x, y[, uplo=’L’[, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a real symmetric band matrix:
where A is a real symmetric band matrix. The arguments A, x and y must have type ’d’ and alpha and beta must be real.
hbmv(A, x, y[, uplo=’L’[, alpha=1.0[, beta=0.0]]])
Matrix-vector product with a real symmetric or complex Hermitian band matrix:
where A is a real symmetric or complex Hermitian band matrix. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha and beta are only allowed if A is complex.
tbmv(A, x[, uplo=’L’[, trans[, diag]]])
Matrix-vector product with a triangular band matrix:
The arguments A and x must have the same type (’d’ or ’z’).
tbsv(A, x[, uplo=’L’[, trans[, diag]]])
Solution of a triangular banded set of linear equations:
where A is a triangular band matrix of with nonzero diagonal elements. The arguments A and x must have the same type (’d’ or ’z’).
ger(x, y, A[, alpha=1.0])
General rank-1 update:
where A is a general matrix. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha are only allowed if A is complex.
geru(x, y, A[, alpha=1.0])
General rank-1 update:
where A is a general matrix. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha are only allowed if A is complex.
syr(x, A[, uplo=’L’[, alpha=1.0]])
Symmetric rank-1 update:
where A is a real symmetric matrix. The arguments A and x must have type ’d’. alpha must be a real number.
her(x, A[, uplo=’L’[, alpha=1.0]])
Hermitian rank-1 update:
where A is a real symmetric or complex Hermitian matrix. The arguments A and x must have the same type (’d’ or ’z’). alpha must be a real number.
syr2(x, y, A[, uplo=’L’[, alpha=1.0]])
Symmetric rank-2 update:
where A is a real symmetric matrix. The arguments A, x and y must have type ’d’. alpha must be real.
her2(x, y, A[, uplo=’L’[, alpha=1.0]])
Symmetric rank-2 update:
where A is a a real symmetric or complex Hermitian matrix. The arguments A, x and y must have the same type (’d’ or ’z’). Complex values of alpha are only allowed if A is complex.
As an example, the following code multiplies the tridiagonal matrix
with the vector x = (1,-1,2,-2).
The following example illustrates the use of tbsv().