matrices

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: MIT Imports: 2 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 [][]float64

func New

func New(rows, cols int) Matrix

New returns a new, empty matrix of the given dimensions

func (Matrix) Cols

func (A Matrix) Cols() int

func (Matrix) Copy

func (A Matrix) Copy() Matrix

func (Matrix) Mul

func (A Matrix) Mul(B, C Matrix) Matrix

Mul multiplies AxB, putting the result in C

func (Matrix) Print

func (A Matrix) Print(title string, f func(int) string)

Print prints the matrix to the screen, f() formats row/col numbers to strings

func (Matrix) Rows

func (A Matrix) Rows() int

func (Matrix) Set

func (A Matrix) Set(value float64)

Set sets all cells to value

func (Matrix) SetRow

func (A Matrix) SetRow(row int, value float64)

SetRow sets all cells in that row to value

Jump to

Keyboard shortcuts

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