Documentation ¶
Index ¶
- Constants
- Variables
- func Equal(a, b Option) bool
- func GetBoolOpt(name string, defval bool, opts ...Option) (val bool)
- func GetComplexOpt(name string, defval complex128, opts ...Option) (val complex128)
- func GetFloatOpt(name string, defval float64, opts ...Option) (val float64)
- func GetIntOpt(name string, defval int, opts ...Option) (val int)
- func GetParam(name string, params ...Option) (val int)
- func GetStringOpt(name string, defval string, opts ...Option) (val string)
- func ParamString(p int) string
- func PrintIndexes(p *IndexOpts)
- func PrintParameters(p *Parameters)
- type BOpt
- type COpt
- type FOpt
- type IOpt
- type IndexOpts
- type Opt
- type Option
- type Parameters
- type SOpt
Constants ¶
const ( // BLAS/LAPACK parameters. Chosen values match corresponding // parameters in CBLAS implementation. RowMajor = 101 // Atlas row-major ColumnMajor = 102 // Atlas column major PNoTrans = 111 // 'N' PTrans = 112 // 'T' PConjTrans = 113 // 'C' PUpper = 121 // 'U' PLower = 122 // 'L' PNonUnit = 131 // 'N' PUnit = 132 // 'U' PDiag = 133 // 'D' PLeft = 141 // 'L' PRight = 142 // 'R' // These for LAPACK only PJobNo = 151 // 'N' PJobValue = 152 // 'V' PJobAll = 153 // 'A' PJobS = 154 // 'S' PJobO = 155 // 'O' PRangeAll = 161 // 'A' PRangeValue = 162 // 'V' PRangeInt = 163 // 'I' )
BLAS/LAPACK matrix parameter constants.
Variables ¶
var ( // trans: No Transpose 'N' OptNoTrans = &IOpt{"trans", PNoTrans} OptNoTransA = &IOpt{"transA", PNoTrans} OptNoTransB = &IOpt{"transB", PNoTrans} // trans: Transpose 'T' OptTrans = &IOpt{"trans", PTrans} OptTransA = &IOpt{"transA", PTrans} OptTransB = &IOpt{"transB", PTrans} // trans: Conjugate Transpose 'C' OptConjTrans = &IOpt{"trans", PConjTrans} OptConjTransA = &IOpt{"transA", PConjTrans} OptConjTransB = &IOpt{"transB", PConjTrans} // uplo: Upper Triangular 'U' OptUpper = &IOpt{"uplo", PUpper} // uplo: Lower Triangular 'L' OptLower = &IOpt{"uplo", PLower} // side parameter 'L', 'R' OptLeft = &IOpt{"side", PLeft} OptRight = &IOpt{"side", PRight} // diag parameter 'U' OptUnit = &IOpt{"diag", PUnit} // diag parameter 'N' OptNonUnit = &IOpt{"diag", PNonUnit} OptDiag = &IOpt{"diag", PDiag} // Lapack jobz 'N' OptJobZNo = &IOpt{"jobz", PJobNo} // Lapack jobz 'V' OptJobZValue = &IOpt{"jobz", PJobValue} // Lapack jobu 'N' OptJobuNo = &IOpt{"jobu", PJobNo} // Lapack jobu 'A' OptJobuAll = &IOpt{"jobu", PJobAll} // Lapack jobu 'S' OptJobuS = &IOpt{"jobu", PJobS} // Lapack jobu 'O' OptJobuO = &IOpt{"jobu", PJobO} // Lapack jobvt 'N', OptJobvtNo = &IOpt{"jobvt", PJobNo} // Lapack jobvt 'A', OptJobvtAll = &IOpt{"jobvt", PJobAll} // Lapack jobvt 'S', OptJobvtS = &IOpt{"jobvt", PJobS} // Lapack jobvt 'O', OptJobvtO = &IOpt{"jobvt", PJobO} // Lapack range 'A' OptRangeAll = &IOpt{"range", PRangeAll} // Lapack range 'V' OptRangeValue = &IOpt{"range", PRangeValue} // Lapack range 'I' OptRangeInt = &IOpt{"range", PRangeInt} )
Matrix parameter option variables.
Functions ¶
func GetBoolOpt ¶
Get boolean option value. If option not present returns defval.
func GetComplexOpt ¶
func GetComplexOpt(name string, defval complex128, opts ...Option) (val complex128)
Get string option value. If option not present returns defval.
func GetFloatOpt ¶
Get float option value. If option not present returns defval.
func GetStringOpt ¶
Get string option value. If option not present returns defval.
func ParamString ¶
Map parameter value to name string that can be used when calling Fortran library functions.
func PrintIndexes ¶
func PrintIndexes(p *IndexOpts)
Types ¶
type IndexOpts ¶
type IndexOpts struct { // these for BLAS and LAPACK N int // default: -1 Nx int // default: -1 Ny int // default: -1 M int // default: -1 Ma int // default: -1 Mb int // default: -1 LDa int // default: 0 LDb int // default: 0 LDc int // default: 0 IncX int // default: 0 IncY int // default: 0 OffsetX int // default: 0 OffsetY int // default: 0 OffsetA int // default: 0 OffsetB int // default: 0 OffsetC int // default: 0 K int // default: -1 Ku int // default: -1 Kl int // default: 0 // these used in LAPACK Nrhs int // default: -1 OffsetD int // default: 0 OffsetDL int // default: 0 OffsetDU int // default: 0 LDw int // default: 0 LDz int // default: 0 OffsetW int // default: 0 OffsetZ int // default: 0 LDu int // default: 0 LDvt int // default: 0 LDt int // default: 0 OffsetS int // default: 0 OffsetU int // default: 0 OffsetVt int // default: 0 }
LinalgIndex structure holds fields for various BLAS/LAPACK indexing variables.
func GetIndexOpts ¶
Parse option list and return index structure with relevant fields set and other fields with default values.
type Option ¶
type Option interface { // Name of option. Name() string // Integer value of option. Int() int // Float value of option or NaN. Float() float64 // Float value of option or NaN. Complex() complex128 // Bool value of option. Bool() bool // Option value as string. String() string // Test if other option is of equal Equal(Option) bool }
Interface for named options.
type Parameters ¶
type Parameters struct {
Trans, TransA, TransB int
Uplo int
Diag int
Side int
Jobz int
Jobu int
Jobvt int
Range int
}
Structure for BLAS/LAPACK function parameters.
func GetParameters ¶
func GetParameters(params ...Option) (p *Parameters, err error)
Parse options and return parameter structure with option fields set to given or sensible defaults.