Documentation ¶
Index ¶
- type Matrix
- func NewColumnVector(values []float64) Matrix
- func NewHorizontalStackedMatrix(vectors [][]float64) Matrix
- func NewRandomMatrix(rows, columns uint, randomFactor float64) Matrix
- func NewRandomUnitMatrix(rows, columns uint, prob float64) Matrix
- func NewRowVector(values []float64) Matrix
- func NewZeroMatrix(rows, columns uint) Matrix
- func (m Matrix) AddColumnVector(a, b MatrixViewable)
- func (m Matrix) At(row, column int) float64
- func (m Matrix) Dims() (rows, columns int)
- func (m Matrix) ElemOp(a MatrixViewable, f func(v float64) float64)
- func (m Matrix) FrobeniusNorm() float64
- func (m Matrix) MatrixElemOp(a, b MatrixViewable, f func(v1, v2 float64) float64)
- func (m Matrix) MatrixMultiply(a, b MatrixViewable)
- func (m Matrix) RowSum(matToSum MatrixViewable, normalize bool)
- func (m Matrix) Set(row, column int, value float64)
- func (m Matrix) SliceColumns(start, end int) MatrixView
- func (m Matrix) String() string
- func (m Matrix) Transpose() MatrixView
- func (m Matrix) View() MatrixView
- type MatrixView
- type MatrixViewable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
func NewColumnVector ¶
func NewRandomMatrix ¶
func NewRandomUnitMatrix ¶
func NewRowVector ¶
func NewZeroMatrix ¶
func (Matrix) AddColumnVector ¶
func (m Matrix) AddColumnVector(a, b MatrixViewable)
func (Matrix) FrobeniusNorm ¶
func (Matrix) MatrixElemOp ¶
func (m Matrix) MatrixElemOp(a, b MatrixViewable, f func(v1, v2 float64) float64)
func (Matrix) MatrixMultiply ¶
func (m Matrix) MatrixMultiply(a, b MatrixViewable)
func (Matrix) RowSum ¶
func (m Matrix) RowSum(matToSum MatrixViewable, normalize bool)
func (Matrix) SliceColumns ¶
func (m Matrix) SliceColumns(start, end int) MatrixView
func (Matrix) Transpose ¶
func (m Matrix) Transpose() MatrixView
func (Matrix) View ¶
func (m Matrix) View() MatrixView
type MatrixView ¶
type MatrixView struct {
// contains filtered or unexported fields
}
func (MatrixView) At ¶
func (v MatrixView) At(row, column int) float64
func (MatrixView) Dims ¶
func (v MatrixView) Dims() (rows, columns int)
func (MatrixView) FrobeniusNorm ¶
func (v MatrixView) FrobeniusNorm() float64
func (MatrixView) Transpose ¶
func (v MatrixView) Transpose() MatrixView
func (MatrixView) View ¶
func (v MatrixView) View() MatrixView
type MatrixViewable ¶
type MatrixViewable interface { At(row, column int) float64 Dims() (rows, columns int) Transpose() MatrixView View() MatrixView FrobeniusNorm() float64 }
Click to show internal directories.
Click to hide internal directories.