mx

package
v0.0.0-...-d8e9cfa Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 NewColumnVector(values []float64) Matrix

func NewHorizontalStackedMatrix

func NewHorizontalStackedMatrix(vectors [][]float64) Matrix

func NewRandomMatrix

func NewRandomMatrix(rows, columns uint, randomFactor float64) Matrix

func NewRandomUnitMatrix

func NewRandomUnitMatrix(rows, columns uint, prob float64) Matrix

func NewRowVector

func NewRowVector(values []float64) Matrix

func NewZeroMatrix

func NewZeroMatrix(rows, columns uint) Matrix

func (Matrix) AddColumnVector

func (m Matrix) AddColumnVector(a, b MatrixViewable)

func (Matrix) At

func (m Matrix) At(row, column int) float64

func (Matrix) Dims

func (m Matrix) Dims() (rows, columns int)

func (Matrix) ElemOp

func (m Matrix) ElemOp(a MatrixViewable, f func(v float64) float64)

func (Matrix) FrobeniusNorm

func (m Matrix) FrobeniusNorm() float64

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) Set

func (m Matrix) Set(row, column int, value float64)

func (Matrix) SliceColumns

func (m Matrix) SliceColumns(start, end int) MatrixView

func (Matrix) String

func (m Matrix) String() string

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
}

Jump to

Keyboard shortcuts

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