Documentation ¶
Index ¶
- func LoadColumn(file string, column int) ([]float64, error)
- func Save(m *Matrix, file string) error
- type Matrix
- func (m *Matrix) Copy() *Matrix
- func (m *Matrix) Get(row, col int) float64
- func (m *Matrix) GetPtr(row, col int) *float64
- func (m *Matrix) Invert() (*Matrix, error)
- func (m *Matrix) InvertInPlace() error
- func (m *Matrix) Multiply(b *Matrix) (*Matrix, error)
- func (m *Matrix) Set(row, col int, value float64)
- func (m *Matrix) Subtract(b *Matrix) (*Matrix, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadColumn ¶
LoadColumn reads the given (zero-based) column from the given matrix file.
Types ¶
type Matrix ¶
Matrix is a dense matrix structure that holds the data in column-major order in a linear array. Because of this lay
func MakeMatrix ¶
MakeMatrix is a convenience function for creating a matrix from a 2 dimensional float slice. It is mainly used for testing purposes.
func (*Matrix) InvertInPlace ¶
InvertInPlace calculates the inverse of the matrix which is stored directly in the original matrix.
func (*Matrix) Multiply ¶
Multiply calculates the matrix-matrix-product C = A * B where A is the matrix on which the method is called, B the method parameter, and C the return value.
Click to show internal directories.
Click to hide internal directories.