matrix

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package matrix contains the implementation of matrix calculus related to the regression algorithms.

Index

Constants

This section is empty.

Variables

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

Functions

func Inverse

func Inverse(ctx context.Context, m [][]float64) ([][]float64, error)

Inverse performs matrix inversion.

func IsRegular added in v0.2.0

func IsRegular(x [][]float64) bool

IsRegular checks if a 2D slice is a non-nil, regular matrix.

func Multiply

func Multiply(ctx context.Context, x [][]float64, y [][]float64) ([][]float64, error)

Multiply produces matrix product z=xy.

func MultiplyByVector

func MultiplyByVector(ctx context.Context, x [][]float64, y []float64) ([]float64, error)

MultiplyByVector multiples a given matrix by a given vector.

func Transpose

func Transpose(ctx context.Context, 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