la

package
v0.0.0-...-4f40efb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

linear algebra routines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matrix

type Matrix struct {
	Rows, Cols   int
	ColumnStride int // increment index by this, to move to next column in same row
	Elements     []float64
}

a column-major matrix

func Multiply

func Multiply(m ...*Matrix) *Matrix

func MultiplyPair

func MultiplyPair(a, b *Matrix) *Matrix

func NewDiagonalMatrixWithElements

func NewDiagonalMatrixWithElements(e []float64) *Matrix

func NewMatrix

func NewMatrix(m, n int) *Matrix

func NewMatrixWithElements

func NewMatrixWithElements(m, n int, elements []float64) *Matrix

func (*Matrix) Copy

func (m *Matrix) Copy() *Matrix

func (*Matrix) Get

func (m *Matrix) Get(i, j int) float64

func (*Matrix) Inc

func (m *Matrix) Inc(i, j int, v float64)

func (*Matrix) Index

func (m *Matrix) Index(i, j int) int

func (*Matrix) Set

func (m *Matrix) Set(i, j int, v float64)

func (*Matrix) String

func (m *Matrix) String() string

type Svd

type Svd struct {
	U, S, Vt *Matrix
}

func ComputeSvd

func ComputeSvd(a *Matrix) *Svd

func (*Svd) String

func (s *Svd) String() string

type Vector

type Vector struct {
	Size     int
	Stride   int
	Elements []float64
}

vector

func NewVector

func NewVector(m int) *Vector

func (*Vector) AsColumnVector

func (m *Vector) AsColumnVector() *Matrix

func (*Vector) Get

func (m *Vector) Get(i int) float64

func (*Vector) Set

func (m *Vector) Set(i int, v float64)

Jump to

Keyboard shortcuts

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