Documentation ¶
Overview ¶
======================================================================
Copyright (C) 2013 Yao Peng All rights reserved filename :matrix.go description :some real matrix operations mail:yaopengdn@126.com http://weibo.com/u/2151926144
======================================================================
Index ¶
- type MatrixErr
- type Matrixf64
- func (m *Matrixf64) Add(rm *Matrixf64) (ret *Matrixf64)
- func (m *Matrixf64) Cond() (ret float64)
- func (m *Matrixf64) Det() (ret float64)
- func (m *Matrixf64) Dist() (ret float64)
- func (m *Matrixf64) DivDot(d float64) (ret *Matrixf64)
- func (m *Matrixf64) DotDiv(d float64) (ret *Matrixf64)
- func (m *Matrixf64) DotMul(d float64) (ret *Matrixf64)
- func (m *Matrixf64) Eig() (ret []complex128)
- func (m *Matrixf64) Equal(rm *Matrixf64) bool
- func (m *Matrixf64) Gauss() *Matrixf64
- func (m *Matrixf64) GetColNum() int
- func (m *Matrixf64) GetRowNum() int
- func (m *Matrixf64) GetVectorSum() (sum float64)
- func (m *Matrixf64) Hess() (Q, B Matrixf64)
- func (m *Matrixf64) InsertCols(im *Matrixf64, col int) *Matrixf64
- func (m *Matrixf64) InsertRows(im *Matrixf64, row int) *Matrixf64
- func (m *Matrixf64) Inv() *Matrixf64
- func (m *Matrixf64) IsSquare() bool
- func (m *Matrixf64) IsSymmetric() bool
- func (m *Matrixf64) LU() *Matrixf64
- func (m *Matrixf64) MELU() *Matrixf64
- func (m *Matrixf64) MatrixNorm1() (ret float64)
- func (m *Matrixf64) MatrixNorm2() (ret float64)
- func (m *Matrixf64) MatrixNormInf() (ret float64)
- func (m *Matrixf64) Mul(rm *Matrixf64) (ret *Matrixf64)
- func (m *Matrixf64) Piece(row, col []int) *Matrixf64
- func (m *Matrixf64) Print()
- func (m *Matrixf64) QR() (Q, R Matrixf64)
- func (m *Matrixf64) Rank() int
- func (m *Matrixf64) Replace(im *Matrixf64, row, col int) *Matrixf64
- func (m *Matrixf64) Rou() (ret float64)
- func (m *Matrixf64) Solve(b *Matrixf64) *Matrixf64
- func (m *Matrixf64) SolveEquation(b *Matrixf64) (x *Matrixf64, e error)
- func (m *Matrixf64) Sub(rm *Matrixf64) (ret *Matrixf64)
- func (m *Matrixf64) T() *Matrixf64
- func (m *Matrixf64) VectorNorm1() (ret float64)
- func (m *Matrixf64) VectorNorm2() (ret float64)
- func (m *Matrixf64) VectorNormInf() (ret float64)
- func (m *Matrixf64) VectorToSlice() []float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matrixf64 ¶
type Matrixf64 [][]float64
func NewVectorf64 ¶
func (*Matrixf64) Eig ¶
func (m *Matrixf64) Eig() (ret []complex128)
func (*Matrixf64) GetVectorSum ¶
func (*Matrixf64) IsSymmetric ¶
func (*Matrixf64) MatrixNorm1 ¶
func (*Matrixf64) MatrixNorm2 ¶
func (*Matrixf64) MatrixNormInf ¶
func (*Matrixf64) Piece ¶
please make sure 'm' is big enough to contain these rows or columns, or system will throw a panic
func (*Matrixf64) Replace ¶
please make sure 'm' has enough space to accommodate the smaller matrix 'im' , or system will throw a panic
func (*Matrixf64) Solve ¶
please make sure the matrix 'm' is an LU matrix.
for example, a non-singular equation Ax = b, the code is below:
x := A.LU().Solve(b)
func (*Matrixf64) SolveEquation ¶
If you can guarantee that the coefficient matrix is nonsingular, should use 'Solve' instead of this for its low efficiency
func (*Matrixf64) VectorNorm1 ¶
func (*Matrixf64) VectorNorm2 ¶
func (*Matrixf64) VectorNormInf ¶
func (*Matrixf64) VectorToSlice ¶
Click to show internal directories.
Click to hide internal directories.