matrix

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNonInvertibleMatrix = errors.New("matrix is not invertible")
	ErrOperationNotAllowed = errors.New("operation not allowed")
	ErrInvalidMatrix       = errors.New("invalid matrix")
)

Functions

func Inverse

func Inverse(m [][]float64) ([][]float64, error)

Inverse performs matrix inversion.

func IsValid

func IsValid(x [][]float64) bool

IsValid checks if a 2D slice is a valid matrix.

func Multiply

func Multiply(x [][]float64, y [][]float64) ([][]float64, error)

Multiply produces matrix product z=xy.

func MultiplyByVector

func MultiplyByVector(x [][]float64, y []float64) ([]float64, error)

MultiplyByVector multiples a given matrix by a given vector.

func Transpose

func Transpose(x [][]float64) ([][]float64, error)

Transpose performs a matrix transposition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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