lapack

package
v0.8.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Gonum LAPACK GoDoc

A collection of packages to provide LAPACK functionality for the Go programming language (http://golang.org). This provides a partial implementation in native go and a wrapper using cgo to a c-based implementation.

Installation

  go get github.com/ArkaGPL/gonum/lapack/...

Packages

lapack

Defines the LAPACK API based on http://www.netlib.org/lapack/lapacke.html

lapack/gonum

Go implementation of the LAPACK API (incomplete, implements the float64 API).

lapack/lapack64

Wrappers for an implementation of the double (i.e., float64) precision real parts of the LAPACK API.

Documentation

Overview

Package lapack provides interfaces for the LAPACK linear algebra standard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyOrtho

type ApplyOrtho byte

ApplyOrtho specifies which orthogonal matrix is applied in Dormbr.

const (
	ApplyP ApplyOrtho = 'P' // Apply P or Pᵀ.
	ApplyQ ApplyOrtho = 'Q' // Apply Q or Qᵀ.
)

type BalanceJob

type BalanceJob byte

BalanceJob specifies matrix balancing operation.

const (
	Permute      BalanceJob = 'P'
	Scale        BalanceJob = 'S'
	PermuteScale BalanceJob = 'B'
	BalanceNone  BalanceJob = 'N'
)

type Complex128

type Complex128 interface{}

Complex128 defines the public complex128 LAPACK API supported by gonum/lapack.

type Direct

type Direct byte

Direct specifies the direction of the multiplication for the Householder matrix.

const (
	Forward  Direct = 'F' // Reflectors are right-multiplied, H_0 * H_1 * ... * H_{k-1}.
	Backward Direct = 'B' // Reflectors are left-multiplied, H_{k-1} * ... * H_1 * H_0.
)

type EVComp

type EVComp byte

EVComp specifies how eigenvectors are computed in Dsteqr.

const (
	EVOrig     EVComp = 'V' // Compute eigenvectors of the original symmetric matrix.
	EVTridiag  EVComp = 'I' // Compute eigenvectors of the tridiagonal matrix.
	EVCompNone EVComp = 'N' // Do not compute eigenvectors.
)

type EVHowMany

type EVHowMany byte

EVHowMany specifies which eigenvectors are computed in Dtrevc3 and how.

const (
	EVAll      EVHowMany = 'A' // Compute all right and/or left eigenvectors.
	EVAllMulQ  EVHowMany = 'B' // Compute all right and/or left eigenvectors multiplied by an input matrix.
	EVSelected EVHowMany = 'S' // Compute selected right and/or left eigenvectors.
)

type EVJob

type EVJob byte

EVJob specifies whether eigenvectors are computed in Dsyev.

const (
	EVCompute EVJob = 'V' // Compute eigenvectors.
	EVNone    EVJob = 'N' // Do not compute eigenvectors.
)

type EVSide

type EVSide byte

EVSide specifies what eigenvectors are computed in Dtrevc3.

const (
	EVRight EVSide = 'R' // Compute only right eigenvectors.
	EVLeft  EVSide = 'L' // Compute only left eigenvectors.
	EVBoth  EVSide = 'B' // Compute both right and left eigenvectors.
)

type Float64

type Float64 interface {
	Dgecon(norm MatrixNorm, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
	Dgeev(jobvl LeftEVJob, jobvr RightEVJob, n int, a []float64, lda int, wr, wi []float64, vl []float64, ldvl int, vr []float64, ldvr int, work []float64, lwork int) (first int)
	Dgels(trans blas.Transpose, m, n, nrhs int, a []float64, lda int, b []float64, ldb int, work []float64, lwork int) bool
	Dgelqf(m, n int, a []float64, lda int, tau, work []float64, lwork int)
	Dgeqrf(m, n int, a []float64, lda int, tau, work []float64, lwork int)
	Dgesvd(jobU, jobVT SVDJob, m, n int, a []float64, lda int, s, u []float64, ldu int, vt []float64, ldvt int, work []float64, lwork int) (ok bool)
	Dgetrf(m, n int, a []float64, lda int, ipiv []int) (ok bool)
	Dgetri(n int, a []float64, lda int, ipiv []int, work []float64, lwork int) (ok bool)
	Dgetrs(trans blas.Transpose, n, nrhs int, a []float64, lda int, ipiv []int, b []float64, ldb int)
	Dggsvd3(jobU, jobV, jobQ GSVDJob, m, n, p int, a []float64, lda int, b []float64, ldb int, alpha, beta, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, work []float64, lwork int, iwork []int) (k, l int, ok bool)
	Dlantr(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, m, n int, a []float64, lda int, work []float64) float64
	Dlange(norm MatrixNorm, m, n int, a []float64, lda int, work []float64) float64
	Dlansy(norm MatrixNorm, uplo blas.Uplo, n int, a []float64, lda int, work []float64) float64
	Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int)
	Dormqr(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
	Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
	Dpbcon(uplo blas.Uplo, n, kd int, ab []float64, ldab int, anorm float64, work []float64, iwork []int) float64
	Dpbtrf(uplo blas.Uplo, n, kd int, ab []float64, ldab int) (ok bool)
	Dpbtrs(uplo blas.Uplo, n, kd, nrhs int, ab []float64, ldab int, b []float64, ldb int)
	Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
	Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool)
	Dpotri(ul blas.Uplo, n int, a []float64, lda int) (ok bool)
	Dpotrs(ul blas.Uplo, n, nrhs int, a []float64, lda int, b []float64, ldb int)
	Dsyev(jobz EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
	Dtbtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, kd, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool)
	Dtrcon(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64
	Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool)
	Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool)
}

Float64 defines the public float64 LAPACK API supported by gonum/lapack.

type GSVDJob

type GSVDJob byte

GSVDJob specifies the singular vector computation type for Generalized SVD.

const (
	GSVDU    GSVDJob = 'U' // Compute orthogonal matrix U.
	GSVDV    GSVDJob = 'V' // Compute orthogonal matrix V.
	GSVDQ    GSVDJob = 'Q' // Compute orthogonal matrix Q.
	GSVDUnit GSVDJob = 'I' // Use unit-initialized matrix.
	GSVDNone GSVDJob = 'N' // Do not compute orthogonal matrix.
)

type GenOrtho

type GenOrtho byte

GenOrtho specifies which orthogonal matrix is generated in Dorgbr.

const (
	GeneratePT GenOrtho = 'P' // Generate Pᵀ.
	GenerateQ  GenOrtho = 'Q' // Generate Q.
)

type LeftEVJob

type LeftEVJob byte

LeftEVJob specifies whether left eigenvectors are computed in Dgeev.

const (
	LeftEVCompute LeftEVJob = 'V' // Compute left eigenvectors.
	LeftEVNone    LeftEVJob = 'N' // Do not compute left eigenvectors.
)

type MatrixNorm

type MatrixNorm byte

MatrixNorm represents the kind of matrix norm to compute.

const (
	MaxAbs       MatrixNorm = 'M' // max(abs(A(i,j)))
	MaxColumnSum MatrixNorm = 'O' // Maximum absolute column sum (one norm)
	MaxRowSum    MatrixNorm = 'I' // Maximum absolute row sum (infinity norm)
	Frobenius    MatrixNorm = 'F' // Frobenius norm (sqrt of sum of squares)
)

type MatrixType

type MatrixType byte

MatrixType represents the kind of matrix represented in the data.

const (
	General  MatrixType = 'G' // A general dense matrix.
	UpperTri MatrixType = 'U' // An upper triangular matrix.
	LowerTri MatrixType = 'L' // A lower triangular matrix.
)

type Pivot

type Pivot byte

Pivot specifies the pivot type for plane rotations.

const (
	Variable Pivot = 'V'
	Top      Pivot = 'T'
	Bottom   Pivot = 'B'
)

type RightEVJob

type RightEVJob byte

RightEVJob specifies whether right eigenvectors are computed in Dgeev.

const (
	RightEVCompute RightEVJob = 'V' // Compute right eigenvectors.
	RightEVNone    RightEVJob = 'N' // Do not compute right eigenvectors.
)

type SVDJob

type SVDJob byte

SVDJob specifies the singular vector computation type for SVD.

const (
	SVDAll       SVDJob = 'A' // Compute all columns of the orthogonal matrix U or V.
	SVDStore     SVDJob = 'S' // Compute the singular vectors and store them in the orthogonal matrix U or V.
	SVDOverwrite SVDJob = 'O' // Compute the singular vectors and overwrite them on the input matrix A.
	SVDNone      SVDJob = 'N' // Do not compute singular vectors.
)

type SchurComp

type SchurComp byte

SchurComp specifies whether and how the Schur vectors are computed in Dhseqr.

const (
	SchurOrig SchurComp = 'V' // Compute Schur vectors of the original matrix.
	SchurHess SchurComp = 'I' // Compute Schur vectors of the upper Hessenberg matrix.
	SchurNone SchurComp = 'N' // Do not compute Schur vectors.
)

type SchurJob

type SchurJob byte

SchurJob specifies whether the Schur form is computed in Dhseqr.

const (
	EigenvaluesOnly     SchurJob = 'E'
	EigenvaluesAndSchur SchurJob = 'S'
)

type Sort

type Sort byte

Sort is the sorting order.

const (
	SortIncreasing Sort = 'I'
	SortDecreasing Sort = 'D'
)

type StoreV

type StoreV byte

StoreV indicates the storage direction of elementary reflectors.

const (
	ColumnWise StoreV = 'C' // Reflector stored in a column of the matrix.
	RowWise    StoreV = 'R' // Reflector stored in a row of the matrix.
)

type UpdateSchurComp

type UpdateSchurComp byte

UpdateSchurComp specifies whether the matrix of Schur vectors is updated in Dtrexc.

const (
	UpdateSchur     UpdateSchurComp = 'V' // Update the matrix of Schur vectors.
	UpdateSchurNone UpdateSchurComp = 'N' // Do not update the matrix of Schur vectors.
)

Directories

Path Synopsis
Package gonum is a pure-go implementation of the LAPACK API.
Package gonum is a pure-go implementation of the LAPACK API.
Package lapack64 provides a set of convenient wrapper functions for LAPACK calls, as specified in the netlib standard (www.netlib.org).
Package lapack64 provides a set of convenient wrapper functions for LAPACK calls, as specified in the netlib standard (www.netlib.org).
Package testlapack implements a set of testing routines for Lapack functions.
Package testlapack implements a set of testing routines for Lapack functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL