<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
|
Matrix operations that perform \(O(n^2)\) work on \(O(n^2)\) data. More...
Matrix operations that perform \(O(n^2)\) work on \(O(n^2)\) data.
These are memory bound, since every operation requires a memory read or write.
void tlapack::gemv | ( | Op | trans, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
const beta_t & | beta, | ||
vectorY_t & | y | ||
) |
General matrix-vector multiply:
\[ y := \alpha op(A) x + \beta y, \]
where \(op(A)\) is one of \(op(A) = A\), \(op(A) = A^T\), \(op(A) = A^H\), or \(op(A) = conj(A)\), alpha and beta are scalars, x and y are vectors, and A is a matrix.
[in] | trans | The operation to be performed:
|
[in] | alpha | Scalar. |
[in] | A | \(op(A)\) is an m-by-n matrix. |
[in] | x | A n-element vector. |
[in] | beta | Scalar. |
[in,out] | y | A m-element vector. |
void tlapack::gemv | ( | Op | trans, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
vectorY_t & | y | ||
) |
General matrix-vector multiply:
\[ y := \alpha op(A) x, \]
where \(op(A)\) is one of \(op(A) = A\), \(op(A) = A^T\), \(op(A) = A^H\), or \(op(A) = conj(A)\), alpha and beta are scalars, x and y are vectors, and A is a matrix.
[in] | trans | The operation to be performed:
|
[in] | alpha | Scalar. |
[in] | A | \(op(A)\) is an m-by-n matrix. |
[in] | x | A n-element vector. |
[in,out] | y | A m-element vector. |
void tlapack::ger | ( | const alpha_t & | alpha, |
const vectorX_t & | x, | ||
const vectorY_t & | y, | ||
matrixA_t & | A | ||
) |
General matrix rank-1 update:
\[ A := \alpha x y^H + A, \]
where alpha is a scalar, x and y are vectors, and A is an m-by-n matrix.
[in] | alpha | Scalar. |
[in] | x | A m-element vector. |
[in] | y | A n-element vector. |
[in] | A | A m-by-n matrix. |
void tlapack::geru | ( | const alpha_t & | alpha, |
const vectorX_t & | x, | ||
const vectorY_t & | y, | ||
matrixA_t & | A | ||
) |
General matrix rank-1 update:
\[ A := \alpha x y^T + A, \]
where alpha is a scalar, x and y are vectors, and A is an m-by-n matrix.
[in] | alpha | Scalar. |
[in] | x | A m-element vector. |
[in] | y | A n-element vector. |
[in] | A | A m-by-n matrix. |
void tlapack::hemv | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
const beta_t & | beta, | ||
vectorY_t & | y | ||
) |
Hermitian matrix-vector multiply:
\[ y := \alpha A x + \beta y, \]
where alpha and beta are scalars, x and y are vectors, and A is an n-by-n Hermitian matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | A | A n-by-n Hermitian matrix. Imaginary parts of the diagonal elements need not be set, are assumed to be zero on entry, and are set to zero on exit. |
[in] | x | A n-element vector. |
[in] | beta | Scalar. |
[in,out] | y | A n-element vector. |
void tlapack::hemv | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
vectorY_t & | y | ||
) |
Hermitian matrix-vector multiply:
\[ y := \alpha A x, \]
where alpha and beta are scalars, x and y are vectors, and A is an n-by-n Hermitian matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | A | A n-by-n Hermitian matrix. Imaginary parts of the diagonal elements need not be set, are assumed to be zero on entry, and are set to zero on exit. |
[in] | x | A n-element vector. |
[in,out] | y | A n-element vector. |
void tlapack::her | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const vectorX_t & | x, | ||
matrixA_t & | A | ||
) |
Hermitian matrix rank-1 update:
\[ A := \alpha x x^H + A, \]
where alpha is a real scalar, x is a vector, and A is an n-by-n Hermitian matrix.
Mind that if alpha is complex, the output matrix is no longer Hermitian.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Real scalar. |
[in] | x | A n-element vector. |
[in,out] | A | A n-by-n Hermitian matrix. Imaginary parts of the diagonal elements need not be set, are assumed to be zero on entry, and are set to zero on exit. |
void tlapack::her2 | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const vectorX_t & | x, | ||
const vectorY_t & | y, | ||
matrixA_t & | A | ||
) |
Hermitian matrix rank-2 update:
\[ A := \alpha x y^H + \text{conj}(\alpha) y x^H + A, \]
where alpha is a scalar, x and y are vectors, and A is an n-by-n Hermitian matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | x | A n-element vector. |
[in] | y | A n-element vector. |
[in,out] | A | A n-by-n Hermitian matrix. Imaginary parts of the diagonal elements need not be set, are assumed to be zero on entry, and are set to zero on exit. |
void tlapack::symv | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
const beta_t & | beta, | ||
vectorY_t & | y | ||
) |
Symmetric matrix-vector multiply:
\[ y := \alpha A x + \beta y, \]
where alpha and beta are scalars, x and y are vectors, and A is an n-by-n symmetric matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | A | A n-by-n symmetric matrix. |
[in] | x | A n-element vector. |
[in] | beta | Scalar. |
[in,out] | y | A n-element vector. |
void tlapack::symv | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const matrixA_t & | A, | ||
const vectorX_t & | x, | ||
vectorY_t & | y | ||
) |
Symmetric matrix-vector multiply:
\[ y := \alpha A x, \]
where alpha and beta are scalars, x and y are vectors, and A is an n-by-n symmetric matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | A | A n-by-n symmetric matrix. |
[in] | x | A n-element vector. |
[in,out] | y | A n-element vector. |
void tlapack::syr | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const vectorX_t & | x, | ||
matrixA_t & | A | ||
) |
Symmetric matrix rank-1 update:
\[ A := \alpha x x^T + A, \]
where alpha is a scalar, x is a vector, and A is an n-by-n symmetric matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | x | A n-element vector. |
[in,out] | A | A n-by-n symmetric matrix. |
void tlapack::syr2 | ( | Uplo | uplo, |
const alpha_t & | alpha, | ||
const vectorX_t & | x, | ||
const vectorY_t & | y, | ||
matrixA_t & | A | ||
) |
Symmetric matrix rank-2 update:
\[ A := \alpha x y^T + \alpha y x^T + A, \]
where alpha is a scalar, x and y are vectors, and A is an n-by-n symmetric matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed from symmetry.
|
[in] | alpha | Scalar. |
[in] | x | A n-element vector. |
[in] | y | A n-element vector. |
[in,out] | A | A n-by-n symmetric matrix. |
void tlapack::trmv | ( | Uplo | uplo, |
Op | trans, | ||
Diag | diag, | ||
const matrixA_t & | A, | ||
vectorX_t & | x | ||
) |
Triangular matrix-vector multiply:
\[ x := op(A) x, \]
where \(op(A)\) is one of \(op(A) = A\), \(op(A) = A^T\), or \(op(A) = A^H\), \(op(A) = conj(A)\), x is a vector, and A is an n-by-n, unit or non-unit, upper or lower triangular matrix.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed to be zero.
|
[in] | trans | The operation to be performed:
|
[in] | diag | Whether A has a unit or non-unit diagonal:
|
[in] | A | A n-by-n matrix. |
[in,out] | x | A n-element vector. |
void tlapack::trsv | ( | Uplo | uplo, |
Op | trans, | ||
Diag | diag, | ||
const matrixA_t & | A, | ||
vectorX_t & | x | ||
) |
Solve the triangular matrix-vector equation.
\[ op(A) x = b, \]
where \(op(A)\) is one of \(op(A) = A\), \(op(A) = A^T\), or \(op(A) = A^H\), x and b are vectors, and A is an n-by-n, unit or non-unit, upper or lower triangular matrix.
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.
[in] | uplo | What part of the matrix A is referenced, the opposite triangle being assumed to be zero.
|
[in] | trans | The equation to be solved:
|
[in] | diag | Whether A has a unit or non-unit diagonal:
|
[in] | A | A n-by-n matrix. |
[in,out] | x | On entry, the n-element vector b. On exit, the n-element vector x. |