Documentation ¶
Overview ¶
Interface to the double-precision real and complex BLAS library.
This package is implementation of CVXOPT Python blas interface in GO.
Double and complex matrices and vectors are stored in column major matrices using the conventional BLAS storage schemes, with the matrix buffers interpreted as one-dimensional arrays.
For each matrix argument X, an additional integer argument offsetX specifies the start of the array, i.e., the pointer of X[offsetX:] is passed to the BLAS function. The other arguments (dimensions and options) have the same meaning as in the BLAS definition. Default values of the dimension arguments are derived from the matrix sizes.
Index ¶
- func Asum(X matrix.Matrix, opts ...linalg.Option) (v matrix.Scalar)
- func AsumComplex(X *matrix.ComplexMatrix, opts ...linalg.Option) (v float64, err error)
- func AsumFloat(X *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
- func Axpy(X, Y matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func AxpyFloat(X, Y *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Copy(X, Y matrix.Matrix, opts ...linalg.Option) (err error)
- func CopyFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (err error)
- func Dot(X, Y matrix.Matrix, opts ...linalg.Option) (v matrix.Scalar)
- func DotFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
- func DotcComplex(X, Y *matrix.ComplexMatrix, opts ...linalg.Option) (v complex128, err error)
- func Dotu(X, Y matrix.Matrix, opts ...linalg.Option) (v matrix.Scalar)
- func DotuComplex(X, Y *matrix.ComplexMatrix, opts ...linalg.Option) (v complex128, err error)
- func Gbmv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func GbmvFloat(A, X, Y *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Gemm(A, B, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func GemmFloat(A, B, C *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Gemv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func GemvFloat(A, X, Y *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Ger(X, Y, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func GerFloat(X, Y, A *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Geru(X, Y, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func Hbmv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Hemm(A, B, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Hemv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Her(X, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func Her2(X, Y, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func Her2k(A, B, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Herk(A, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Nrm2(X matrix.Matrix, opts ...linalg.Option) (v matrix.Scalar)
- func Nrm2Complex(X *matrix.ComplexMatrix, opts ...linalg.Option) (v float64, err error)
- func Nrm2Float(X *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
- func PanicOnError(flag bool)
- func Sbmv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func SbmvFloat(A, X, Y *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Scal(X matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func ScalFloat(X *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Swap(X, Y matrix.Matrix, opts ...linalg.Option) (err error)
- func SwapFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (err error)
- func Symm(A, B, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func SymmFloat(A, B, C *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Symv(A, X, Y matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func SymvFloat(A, X, Y *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Syr(X, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func Syr2(X, Y, A matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func Syr2Float(X, Y, A *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Syr2k(A, B, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func Syr2kFloat(A, B, C *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func SyrFloat(X, A *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Syrk(A, C matrix.Matrix, alpha, beta matrix.Scalar, opts ...linalg.Option) (err error)
- func SyrkFloat(A, C *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
- func Tbmv(A, X matrix.Matrix, opts ...linalg.Option) (err error)
- func TbmvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
- func Tbsv(A, X matrix.Matrix, opts ...linalg.Option) (err error)
- func TbsvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
- func Trmm(A, B matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func TrmmFloat(A, B *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Trmv(A, X matrix.Matrix, opts ...linalg.Option) (err error)
- func TrmvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
- func Trsm(A, B matrix.Matrix, alpha matrix.Scalar, opts ...linalg.Option) (err error)
- func TrsmFloat(A, B *matrix.FloatMatrix, alpha float64, opts ...linalg.Option) (err error)
- func Trsv(A, X matrix.Matrix, opts ...linalg.Option) (err error)
- func TrsvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asum ¶
Returns ||Re x||_1 + ||Im x||_1.
ARGUMENTS
X float or complex matrix
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to n = 1+(len(x)-offset-1)/inc or 0 if len(x) > offset+1 inc positive integer offset nonnegative integer
func AsumComplex ¶
See function Asum.
func AsumFloat ¶
func AsumFloat(X *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
See function Asum.
func Axpy ¶
Constant times a vector plus a vector (Y := alpha*X+Y).
ARGUMENTS
X float or complex matrix Y float or complex matrix. Must have the same type as X. alpha number (float or complex singleton matrix). Complex alpha is only allowed if x is complex.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to 1+(len(x)-offsetx-1)/incx or 0 if len(x) >= offsetx+1 incx nonzero integer incy nonzero integer offsetx nonnegative integer offsety nonnegative integer;
func Copy ¶
Copies a vector X to a vector Y (Y := X).
ARGUMENTS
X float or complex matrix Y float or complex matrix. Must have the same type as X.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is given by 1+(len(x)-offsetx-1)/incx or 0 if len(x) > offsetx+1 incx nonzero integer incy nonzero integer offsetx nonnegative integer offsety nonnegative integer;
func CopyFloat ¶
func CopyFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (err error)
See function Copy.
func Dot ¶
Returns Y = X^H*Y for real or complex X, Y.
ARGUMENTS
X float or complex matrix Y float or complex matrix. Must have the same type as X.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to nx = 1+(len(x)-offsetx-1)/incx or 0 if len(x) > offsetx+1. If the default value is used, it must be equal to ny = 1+(len(y)-offsetx-1)/|incy| or 0 if len(y) > offsety+1 incx nonzero integer [default=1] incy nonzero integer [default=1] offsetx nonnegative integer [default=0] offsety nonnegative integer [default=0]
func DotFloat ¶
func DotFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
See functin Dot.
func DotcComplex ¶
func DotcComplex(X, Y *matrix.ComplexMatrix, opts ...linalg.Option) (v complex128, err error)
See function Dotc.
func Dotu ¶
Returns Y = X^T*Y for real or complex X, Y.
ARGUMENTS
X float or complex matrix Y float or complex matrix. Must have the same type as X.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to nx = 1+(len(x)-offsetx-1)/incx or 0 if len(x) > offsetx+1. If the default value is used, it must be equal to ny = 1+(len(y)-offsetx-1)/|incy| or 0 if len(y) > offsety+1 incx nonzero integer, [default=1] incy nonzero integer, [default=1] offsetx nonnegative integer, [default=0] offsety nonnegative integer, [default=0]
func DotuComplex ¶
func DotuComplex(X, Y *matrix.ComplexMatrix, opts ...linalg.Option) (v complex128, err error)
See function Dot.
func Gbmv ¶
Matrix-vector product with a general banded matrix. (L2)
Computes
Y := alpha*A*X + beta*Y, if trans = PNoTrans Y := alpha*A^T*X + beta*Y, if trans = PTrans Y := beta*y, if n=0, m>0, and trans = PNoTrans Y := beta*y, if n>0, m=0, and trans = PTrans
The matrix A is m by n with upper bandwidth ku and lower bandwidth kl. Returns immediately if n=0 and trans is 'Trans', or if m=0 and trans is 'N'.
ARGUMENTS
X float n*1 matrix. Y float m*1 matrix A float m*n matrix. alpha number (float). beta number (float).
OPTIONS
trans NoTrans or Trans m nonnegative integer, default A.Rows() kl nonnegative integer n nonnegative integer. If negative, the default value is used. ku nonnegative integer. If negative, the default value is used. ldA positive integer. ldA >= kl+ku+1. If zero, the default value is used. incx nonzero integer, default =1 incy nonzero integer, default =1 offsetA nonnegative integer, default =0 offsetx nonnegative integer, default =0 offsety nonnegative integer, default =0
func Gemm ¶
General matrix-matrix product. (L3)
PURPOSE Computes
C := alpha*A*B + beta*C if transA = PNoTrans and transB = PNoTrans. C := alpha*A^T*B + beta*C if transA = PTrans and transB = PNoTrans. C := alpha*A^H*B + beta*C if transA = PConjTrans and transB = PNoTrans. C := alpha*A*B^T + beta*C if transA = PNoTrans and transB = PTrans. C := alpha*A^T*B^T + beta*C if transA = PTrans and transB = PTrans. C := alpha*A^H*B^T + beta*C if transA = PConjTrans and transB = PTrans. C := alpha*A*B^H + beta*C if transA = PNoTrans and transB = PConjTrans. C := alpha*A^T*B^H + beta*C if transA = PTrans and transB = PConjTrans. C := alpha*A^H*B^H + beta*C if transA = PConjTrans and transB = PConjTrans.
The number of rows of the matrix product is m. The number of columns is n. The inner dimension is k. If k=0, this reduces to C := beta*C.
ARGUMENTS
A float or complex matrix, m*k B float or complex matrix, k*n C float or complex matrix, m*n alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
transA PNoTrans, PTrans or PConjTrans transB PNoTrans, PTrans or PConjTrans m integer. If negative, the default value is used. The default value is m = A.Rows of if transA != PNoTrans m = A.Cols. n integer. If negative, the default value is used. The default value is n = (transB == PNoTrans) ? B.Cols : B.Rows. k integer. If negative, the default value is used. The default value is k=A.Cols or if transA != PNoTrans) k = A.Rows, transA=PNoTrans. If the default value is used it should also be equal to (transB == PNoTrans) ? B.Rows : B.Cols. ldA nonnegative integer. ldA >= max(1,m) of if transA != NoTrans max(1,k). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,k) or if transB != NoTrans max(1,n). If zero, the default value is used. ldC nonnegative integer. ldC >= max(1,m). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer offsetC nonnegative integer;
func Gemv ¶
General matrix-vector product. (L2)
Computes:
Y := alpha*A*X + beta*Y, if trans is NoTrans Y := alpha*A^T*X + beta*Y, if trans is Trans Y := beta*Y, if n=0, m>0 and trans is NoTrans Y := beta*Y, if n>0, m=0 and trans is Trans
The matrix A is m by n. Returns immediately if n=0 and trans is PTrans, or if m=0 and trans is PNoTrans.
ARGUMENTS
A float or complex m*n matrix X float or complex n*1 matrix. Y float or complex m*1 matrix. alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
trans PNoTrans, PTrans, PConjTrans m integer. If negative, the default value is used. n integer. If negative, the default value is used. ldA nonnegative integer. ldA >= max(1,m). If zero, the default value is used. incx nonzero integer incy nonzero integer offsetA nonnegative integer offsetx nonnegative integer offsety nonnegative integer
func Ger ¶
General rank-1 update. (L2)
Ger(X, Y, A, alpha=1.0, m=A.Rows, n=A.Cols, incx=1, incy=1, ldA=max(1,A.Rows), offsetx=0, offsety=0, offsetA=0)
COMPUTES
A := A + alpha*X*Y^H with A m*n, real or complex.
ARGUMENTS
X float or complex matrix. Y float or complex matrix. Must have the same type as X. A float or complex matrix. Must have the same type as X. alpha number (float or complex singleton matrix).
OPTIONS
m integer. If negative, the default value is used. n integer. If negative, the default value is used. incx nonzero integer incy nonzero integer ldA nonnegative integer. ldA >= max(1,m). If zero, the default value is used. offsetx nonnegative integer offsety nonnegative integer offsetA nonnegative integer;
func Geru ¶
General rank-1 update. (L2)
Geru(X, Y, A, alpha=1.0, m=A.Rows, n=A.Cols, incx=1, incy=1, ldA=max(1,A.Rows), offsetx=0, offsety=0, offsetA=0)
COMPUTES
A := A + alpha*X*Y^T with A m*n, real or complex.
ARGUMENTS
X float or complex matrix. Y float or complex matrix. Must have the same type as X. A float or complex matrix. Must have the same type as X. alpha number (float or complex singleton matrix).
OPTIONS
m integer. If negative, the default value is used. n integer. If negative, the default value is used. incx nonzero integer incy nonzero integer ldA nonnegative integer. ldA >= max(1,m). If zero, the default value is used. offsetx nonnegative integer offsety nonnegative integer offsetA nonnegative integer;
func Hbmv ¶
Matrix-vector product with a real symmetric or complex hermitian band matrix.
Computes with A real symmetric and banded of order n and with bandwidth k.
Y := alpha*A*X + beta*Y
ARGUMENTS
A float or complex n*n matrix X float or complex n*1 matrix Y float or complex n*1 matrix alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
uplo PLower or PUpper n integer. If negative, the default value is used. k integer. If negative, the default value is used. The default value is k = max(0,A.Rows()-1). ldA nonnegative integer. ldA >= k+1. If zero, the default vaule is used. incx nonzero integer incy nonzero integer offsetA nonnegative integer offsetx nonnegative integer offsety nonnegative integer
func Hemv ¶
Matrix-vector product with a real symmetric or complex Hermitian matrix. (L2)
Hemv(A, X, Y, alpha=1.0, beta=0.0, uplo=PLower, n=A.Rows, ldA=max(1,A.Rows), incx=1, incy=1, offsetA=0, offsetx=0, offsety=0)
Computes
Y := alpha*A*X + beta*Y with A real symmetric of order n.
ARGUMENTS
A float or complex n*n matrix X float or complex n*1 matrix Y float or complex n*1 matrix alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
uplo PLower or PUpper n integer. If negative, the default value is used. If the default value is used, we require that A.Rows()=A.Cols(). ldA nonnegative integer. ldA >= max(1,n). If zero, the default value is used. incx nonzero integer incy nonzero integer offsetA nonnegative integer offsetx nonnegative integer offsety nonnegative integer
func Her ¶
Symmetric rank-1 update. (L2)
Her(X, A, alpha, uplo=PLowoer, n=A.Rows, incx=1, ldA=max(1,A.Rows), offsetx=0, offsetA=0)
COMPUTES
A := A + alpha*X*X^H
A real symmetric or complex hermitian matrix of order n.
ARGUMENTS
X float or complex matrix. A float or complex matrix. alpha number (float or complex singleton matrix)
OPTIONS:
uplo PLower or PUpper n integer. If negative, the default value is used. incx nonzero integer ldA nonnegative integer. ldA >= max(1,n). If zero, the default value is used. offsetx nonnegative integer offsetA nonnegative integer;
func Her2 ¶
Symmetric rank-2 update. her2(x, y, A, uplo='L', alpha=1.0, n=A.size[0], incx=1, incy=1,
ldA=max(1,A.size[0]), offsetx=0, offsety=0, offsetA=0)
PURPOSE Computes A := A + alpha*(x*y^T + y*x^T) with A real symmetric or complex hermitian matix of order n.
ARGUMENTS x float or complex matrix y float or complex matrix A float or complex matrix alpha float or complex singleton value
OPTIONS: uplo 'L' or 'U' n integer. If negative, the default value is used. incx nonzero integer incy nonzero integer ldA nonnegative integer. ldA >= max(1,n).
If zero the default value is used.
offsetx nonnegative integer offsety nonnegative integer offsetA nonnegative integer;
func Her2k ¶
Rank-2k update of symmetric matrix. (L3)
Her2k(A, B, C, alpha, beta, uplo=PLower, trans=PNoTrans, n=-1, k=-1, ldA=max(1,A.Rows), ldB=max(1,B.Rows), ldC=max(1,C.Rows), offsetA=0, offsetB=0, offsetC=0)
PURPOSE
C := alpha*(A*B^T + B*A^T) + beta*C, if trans is PNoTrans C := alpha*(A^T*B + B^T*A) + beta*C, if trans is PTrans
C is symmetric (real or complex) of order n. The inner dimension of the matrix product is k. If k=0 this is interpreted as C := beta*C.
ARGUMENTS
A float or complex matrix B float or complex matrix. Must have the same type as A. C float or complex matrix. Must have the same type as A. alpha number (float or complex). Complex alpha is only allowed if A is complex. beta number (float or complex). Complex beta is only allowed if A is complex.
OPTIONS
uplo PLower or PUpper trans PNoTrans, PTrans or PConjTrans (PConjTrans is only allowed when in the real case and means the same as PTrans) n integer. If negative, the default value is used. The default value is n = A.Rows or trans != PNoTrans n = A.Cols If the default value is used, it should be equal to B.Rows or if trans != PNoTrans then B.Cols. k integer. If negative, the default value is used. The default value is k = A.Cols or if trans != PNoTrans then k = A.Rows If the default value is used, it should be equal to B.Cols or if trans != PNoTrans then equal to B.Rows. ldA nonnegative integer. ldA >= max(1,n) or if trans != PNoTrans ldA >= max(1,k). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,n) or if trans != PNoTrans then ldB >= max(1,k). If zero, the default value is used. ldC nonnegative integer. ldC >= max(1,n). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer offsetC nonnegative integer
func Herk ¶
Rank-k update of symmetric matrix. (L3)
Herk(A, C, alpha, beta, uplo=PLower, trans=PNoTrans, n=-1, k=-1, ldA=max(1,A.Rows), ldC=max(1,C.Rows), offsetA=0, offsetB=0)
Computes
C := alpha*A*A^T + beta*C, if trans is PNoTrans C := alpha*A^T*A + beta*C, if trans is PTrans
C is symmetric (real or complex) of order n. The inner dimension of the matrix product is k. If k=0 this is interpreted as C := beta*C.
ARGUMENTS
A float or complex matrix. C float or complex matrix. Must have the same type as A. alpha number (float or complex singleton matrix). Complex alpha is only allowed if A is complex. beta number (float or complex singleton matrix). Complex beta is only allowed if A is complex.
OPTIONS
uplo PLower or PUpper trans PNoTrans or PTrans n integer. If negative, the default value is used. The default value is n = A.Rows or if trans == PNoTrans n = A.Cols. k integer. If negative, the default value is used. The default value is k = A.Cols, or if trans == PNoTrans k = A.Rows. ldA nonnegative integer. ldA >= max(1,n) or if trans != PNoTrans ldA >= max(1,k). If zero, the default value is used. ldC nonnegative integer. ldC >= max(1,n). If zero, the default value is used. offsetA nonnegative integer offsetC nonnegative integer;
func Nrm2 ¶
Returns the Euclidean norm of a vector (returns ||x||_2).
ARGUMENTS
X float or complex matrix
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to 1+(len(x)-offsetx-1)/incx or 0 if len(x) > offsetx+1 inc positive integer offset nonnegative integer
func Nrm2Complex ¶
See function Nrm2.
func Nrm2Float ¶
func Nrm2Float(X *matrix.FloatMatrix, opts ...linalg.Option) (v float64)
See function Nrm2.
func PanicOnError ¶
func PanicOnError(flag bool)
func Sbmv ¶
Matrix-vector product with a real symmetric band matrix. (L2)
Sbmv(A, X, Y, alpha=1.0, beta=0.0, uplo=PLower, n=A.Cols, k=-1, ldA=A.Rows, incx=1, incy=1, offsetA=0, offsetx=0, offsety=0)
Computes with A real symmetric and banded of order n and with bandwidth k.
Y := alpha*A*X + beta*Y
ARGUMENTS
A float or complex n*n matrix X float or complex n*1 matrix Y float or complex n*1 matrix alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
uplo PLower or PUpper n integer. If negative, the default value is used. k integer. If negative, the default value is used. The default value is k = max(0,A.Rows()-1). ldA nonnegative integer. ldA >= k+1. If zero, the default vaule is used. incx nonzero integer incy nonzero integer offsetA nonnegative integer offsetx nonnegative integer offsety nonnegative integer
func Scal ¶
Scales a vector by a constant (X := alpha*X).
ARGUMENTS
X float or complex matrix alpha number (float or complex singleton matrix). Complex alpha is only allowed if X is complex.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to 1+(len(x)-offset-1)/inc or 0 if len(x) > offset+1. inc positive integer, default = 1 offset nonnegative integer, default = 0
func Swap ¶
Interchanges two vectors (X <-> Y).
ARGUMENTS
X float or complex matrix Y float or complex matrix. Must have the same type as X.
OPTIONS
n integer. If n<0, the default value of n is used. The default value is equal to 1+(len(x)-offsetx-1)/abs(incx) or 0 if len(x) > offsetx+1. Also if the default value is used, it must be equal to 1+(len(y)-offsetx-1)/abs(incy) or 0 if len(y) > offsety + 1. incx nonzero integer incy nonzero integer offsetx nonnegative integer offsety nonnegative integer;
func SwapFloat ¶
func SwapFloat(X, Y *matrix.FloatMatrix, opts ...linalg.Option) (err error)
See function Swap.
func Symm ¶
Matrix-matrix product where one matrix is symmetric. (L3) Computes C := alpha*A*B + beta*C, if side is PLeft C := alpha*B*A + beta*C, if side is PRight C is m by n and A is real symmetric. ARGUMENTS A float or complex matrix B float or complex matrix. C float m*n matrix. alpha number (float). beta number (float). OPTIONS side PLeft or PRight' uplo PLower or PUpper m integer. If negative, the default value is used. If the default value is used and side = PLeft, then m must be equal to A.Rows and A.Cols. n integer. If negative, the default value is used. If the default value is used and side = PRight, then must be equal to A.Rows and A.Cols. ldA nonnegative integer. ldA >= max(1, m) or if side == PRight ldA >= max(1, n). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,n) or if side == PRight ldB >= max(1, m). If zero, the default value is used. ldC nonnegative integer. ldC >= max(1,m). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer offsetC nonnegative integer
func Symv ¶
Matrix-vector product with a real symmetric matrix. (L2)
Computes with A real symmetric of order n.
Y := alpha*A*X + beta*Y
ARGUMENTS
A float or complex n*n matrix X float or complex n*1 matrix Y float or complex n*1 matrix alpha number (float or complex singleton matrix) beta number (float or complex singleton matrix)
OPTIONS
uplo PLower or PUpper n integer. If negative, the default value is used. If the default value is used, we require that A.Rows()=A.Cols(). ldA nonnegative integer. ldA >= max(1,n). If zero, the default value is used. incx nonzero integer incy nonzero integer offsetA nonnegative integer offsetx nonnegative integer offsety nonnegative integer
func Syr ¶
Symmetric rank-1 update. (L2)
syr(X, A, alpha=1.0, uplo=PLower, n=A.Rows, incx=1, ldA=max(1,A.Rows), offsetx=0, offsetA=0)
COMPUTES
A := A + alpha*X*X^T
A real symmetric matrix of order n.
ARGUMENTS
X float or complex matrix. A float or complex matrix. alpha real number
OPTIONS:
uplo PLower or PUpper n integer. If negative, the default value is used. incx nonzero integer ldA nonnegative integer. ldA >= max(1,n). If zero, the default value is used. offsetx nonnegative integer offsetA nonnegative integer;
func Syr2 ¶
Symmetric rank-2 update. syr2(x, y, A, uplo='L', alpha=1.0, n=A.size[0], incx=1, incy=1,
ldA=max(1,A.size[0]), offsetx=0, offsety=0, offsetA=0)
PURPOSE Computes A := A + alpha*(x*y^T + y*x^T) with A real symmetric matrix of order n. ARGUMENTS x float matrix y float matrix A float matrix alpha real number (int or float)
OPTIONS uplo 'L' or 'U' n integer. If negative, the default value is used. incx nonzero integer incy nonzero integer ldA nonnegative integer. ldA >= max(1,n).
If zero the default value is used.
offsetx nonnegative integer offsety nonnegative integer offsetA nonnegative integer;
func Syr2k ¶
Rank-2k update of symmetric matrix. (L3)
syr2k(A, B, C, alpha, beta, uplo=PLower, trans=PNoTrnas, n=-1, k=-1, ldA=max(1,A.Rows), ldB=max(1,B.Rows), ldC=max(1,C.Rows), offsetA=0, offsetB=0, offsetC=0)
PURPOSE
C := alpha*(A*B^T + B*A^T) + beta*C, if trans is NoTrans C := alpha*(A^T*B + B^T*A) + beta*C, if trans is Trans
C is symmetric (real or complex) of order n. The inner dimension of the matrix product is k. If k=0 this is interpreted as C := beta*C.
ARGUMENTS
A float or complex matrix B float or complex matrix. Must have the same type as A. C float or complex matrix. Must have the same type as A. alpha number (int, float or complex). Complex alpha is only allowed if A is complex. beta number (int, float or complex). Complex beta is only allowed if A is complex.
OPTIONS
uplo PLower or PUpper trans PNoTrans, PTrans or PConjTrans (PConjTrans is only allowed when in the real case and means the same as PTrans) n integer. If negative, the default value is used. The default value is n = A.Rows or trans != PNoTrans n = A.Cols If the default value is used, it should be equal to B.Rows or if trans != PNoTrans then B.Cols. k integer. If negative, the default value is used. The default value is k = A.Cols or if trans != PNoTrans then k = A.Rows If the default value is used, it should be equal to B.Cols or if trans != PNoTrans then equal to B.Rows. ldA nonnegative integer. ldA >= max(1,n) or if trans != PNoTrans ldA >= max(1,k). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,n) or if trans != PNoTrans then ldB >= max(1,k). If zero, the default value is used. ldC nonnegative integer. ldC >= max(1,n). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer offsetC nonnegative integer
func Syr2kFloat ¶
func Syr2kFloat(A, B, C *matrix.FloatMatrix, alpha, beta float64, opts ...linalg.Option) (err error)
See function Syrk2.
func Syrk ¶
Rank-k update of symmetric matrix. (L3)
Syrk(A, C, alpha=1.0, beta=0.0, uplo=PLower, trans=PNoTrans, n=-1, k=-1, ldA=max(1,A.Rows), ldC=max(1,C.Rows), offsetA=0, offsetB=0)
PURPOSE
C := alpha*A*A^T + beta*C, if trans is PNoTrans C := alpha*A^T*A + beta*C, if trans is PTrans C := alpha*A^H*A + beta*C, if trans is PConjTrans
C is symmetric (real or complex) of order n. The inner dimension of the matrix product is k. If k=0 this is interpreted as C := beta*C.
ARGUMENTS
A float or complex n*k matrix C float or complex n*n matrix. Must have the same type as A. alpha number (float or complex singleton matrix). Complex alpha is only allowed if A is complex. beta number (float or complex singleton matrix). Complex beta is only allowed if A is complex.
OPTIONS
uplo PLower or PUpper trans PNoTrans, PTrans or PConjTrans n integer. If negative, the default value is used. The default value is n = A.Rows of if trans != PNoTrans) n = A.Cols. k integer. If negative, the default value is used. The default value is k = A.Cols or if trans != PNoTrans k = A.Rows. ldA nonnegative integer. ldA >= max(1, n) or if trans != PNoTrans max(1, k). If zero, the default value [max(1, A.Rows)] is used. ldC nonnegative integer. ldC >= max(1,n). If zero, the default value is used. offsetA nonnegative integer offsetC nonnegative integer;
func Tbmv ¶
Matrix-vector product with a triangular band matrix. (L2)
Tbmv(A, x, uplo=PLower, trans=PNoTrans, diag=PNonUnit, n=A.Cols, k=max(0,A.Rows-1), ldA=A.size[0], incx=1, offsetA=0, offsetx=0)
COMPUTES
X := A*X, if trans is PNoTrans X := A^T*X, if trans is PTrans X := A^H*X, if trans is PConjTrans
A is banded triangular of order n and with bandwith k.
ARGUMENTS
A float or complex matrix X float or complex matrix. Must have the same type as A.
OPTIONS
uplo PLower or PUpper trans PNoTrans or PTrans diag PNonUnit or PUnit n nonnegative integer. If negative, the default value is used. k nonnegative integer. If negative, the default value is used. ldA nonnegative integer. lda >= 1+k. If zero the default value is used. incx nonzero integer offsetA nonnegative integer offsetx nonnegative integer
func TbmvFloat ¶
func TbmvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
See function Tbmv.
func Tbsv ¶
Solution of a triangular and banded set of equations. Tbsv(A, X, uplo=PLower, trans=PNoTrans, diag=PNonDiag, n=A.Cols, k=max(0,A.Rows-1), ldA=A.size[0], incx=1, offsetA=0, offsetx=0)
PURPOSE
X := A^{-1}*X, if trans is PNoTrans X := A^{-T}*X, if trans is PTrans X := A^{-H}*X, if trans is PConjTrans A is banded triangular of order n and with bandwidth k. ARGUMENTS A float or complex m*k matrix. X float or complex k*1 matrix. Must have the same type as A. OPTIONS uplo PLower or PUpper trans PNoTrans, PTrans or PConjTrans diag PNoNUnit or PUnit n nonnegative integer. If negative, the default value is used. k nonnegative integer. If negative, the default value is used. ldA nonnegative integer. ldA >= 1+k. If zero the default value is used. incx nonzero integer offsetA nonnegative integer offsetx nonnegative integer;
func TbsvFloat ¶
func TbsvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
See function Tbsv.
func Trmm ¶
Matrix-matrix product where one matrix is triangular. (L3)
Trmm(A, B, alpha, side=PLeft, uplo=PLower, transA=PNoTrans, diag=PNonUnit, m=-1, n=-1, ldA=max(1,A.Rows), ldB=max(1,B.Rows), offsetA=0, offsetB=0)
Computes
B := alpha*A*B if transA is PNoTrans and side = PLeft B := alpha*B*A if transA is PNoTrans and side = PRight B := alpha*A^T*B if transA is PTrans and side = PLeft B := alpha*B*A^T if transA is PTrans and side = PRight B := alpha*A^H*B if transA is PConjTrans and side = PLeft B := alpha*B*A^H if transA is PConjTrans and side = PRight
B is m by n and A is triangular.
ARGUMENTS
A float or complex matrix B float or complex matrix. Must have the same type as A. alpha number (float or complex). Complex alpha is only allowed if A is complex.
OPTIONS
side PLeft or PRight uplo PLower or PUpper transA PNoTrans or PTrans diag PNonUnit or PUnit m integer. If negative, the default value is used. The default value is m = A.Rows or if side == PRight m = B.Rows If the default value is used and side is PLeft, m must be equal to A.Cols. n integer. If negative, the default value is used. The default value is n = B.Cols or if side )= PRight n = A.Rows. If the default value is used and side is PRight, n must be equal to A.Cols. ldA nonnegative integer. ldA >= max(1,m) of if side == PRight lda >= max(1,n). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,m). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer
func Trmv ¶
Matrix-vector product with a triangular matrix. (L2)
Trmv(A, x, uplo=PLower, trans=PNoTrans, diag=PNonUnit, n=A.Rows, ldA=max(1,A.Rows), incx=1, offsetA=0, offsetx=0)
COMPUTES
X := A*X, if trans is PNoTrans X := A^T*X, if trans is PTrans X := A^H*X, if trans is PConjTrans
A is triangular of order n.
ARGUMENTS
A float or complex matrix X float or complex matrix. Must have the same type as A.
OPTIONS
uplo PLower or PUpper trans PNoTrans or PTrans diag PNonUnit or PUnit n integer. If negative, the default value is used. If the default value is used, we require that A.Rows = A.Cols. ldA nonnegative integer. ldA >= max(1,n). If zero the default value is used. incx nonzero integer, default=1 offsetA nonnegative integer, default=0 offsetx nonnegative integer, default=0
func TrmvFloat ¶
func TrmvFloat(A, X *matrix.FloatMatrix, opts ...linalg.Option) (err error)
See function Trmv.
func Trsm ¶
Solution of a triangular system of equations with multiple righthand sides. (L3)
Trsm(A, B, alpha, side=PLeft, uplo=PLower, transA=PNoTrans, diag=PNonUnit, m=-1, n=-1, ldA=max(1,A.Rows), ldB=max(1,B.Rows), offsetA=0, offsetB=0)
Computes
B := alpha*A^{-1}*B if transA is PNoTrans and side = PLeft B := alpha*B*A^{-1} if transA is PNoTrans and side = PRight B := alpha*A^{-T}*B if transA is PTrans and side = PLeft B := alpha*B*A^{-T} if transA is PTrans and side = PRight B := alpha*A^{-H}*B if transA is PConjTrans and side = PLeft B := alpha*B*A^{-H} if transA is PConjTrans and side = PRight
B is m by n and A is triangular. The code does not verify whether A is nonsingular.
ARGUMENTS
A float or complex matrix. B float or complex matrix. Must have the same type as A. alpha number (float or complex). Complex alpha is only allowed if A is complex.
OPTIONS
side PLeft or PRight uplo PLower or PUpper transA PNoTrans or PTrans diag PNonUnit or PUnit m integer. If negative, the default value is used. The default value is m = A.Rows or if side == PRight m = B.Rows If the default value is used and side is PLeft, m must be equal to A.Cols. n integer. If negative, the default value is used. The default value is n = B.Cols or if side )= PRight n = A.Rows. If the default value is used and side is PRight, n must be equal to A.Cols. ldA nonnegative integer. ldA >= max(1,m) of if side == PRight lda >= max(1,n). If zero, the default value is used. ldB nonnegative integer. ldB >= max(1,m). If zero, the default value is used. offsetA nonnegative integer offsetB nonnegative integer
func Trsv ¶
Solution of a triangular set of equations with one righthand side. (L2)
Trsv(A, x, uplo=PLower, trans=PNoTrans, diag=PNonUnit, n=A.Cols, ldA=max(1,A.Rows), incx=1, offsetA=0, offsetx=0)
PURPOSE
X := A^{-1}*X, if trans is PNoTrans X := A^{-T}*X, if trans is PTrans X := A^{-H}*X, if trans is PConjTrans
A is triangular of order n. The code does not verify whether A is nonsingular.
ARGUMENTS
A float or complex m*n matrix. X float or complex n*1 matrix. Must have the same type as A.
OPTIONS
uplo PLower or PUpper trans PNoTrans or PTrans diag PNoNUnit or PUnit n integer. If negative, the default value is used. If the default value is used, we require that A.rows = A.cols. ldA nonnegative integer. ldA >= max(1,n). If zero, the default value is used. incx nonzero integer offsetA nonnegative integer offsetx nonnegative integer
Types ¶
This section is empty.