matrix

package
v0.0.0-...-0d9dfb7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConst

func AddConst(val float64, m *mat.Dense) (*mat.Dense, error)

AddConst adds a constant value to every element of matrix It modifies the matrix m passed in as a paramter. AddConstant fails with error if empty matrix is supplied

func ColsMax

func ColsMax(cols int, m *mat.Dense) ([]float64, error)

ColsMax returns a slice of max values of first cols number of matrix columns It returns error if passed in matrix is nil, has zero size or requested number of columns exceeds the number of columns in the matrix passed in as parameter.

func ColsMean

func ColsMean(cols int, m *mat.Dense) ([]float64, error)

ColsMean returns a slice of mean values of first cols matrix columns It returns error if passed in matrix is nil or has zero size or requested number of columns exceeds the number of columns in matrix m.

func ColsMin

func ColsMin(cols int, m *mat.Dense) ([]float64, error)

ColsMin returns a slice of min values of first cols number of matrix columns It returns error if passed in matrix is nil, has zero size or requested number of columns exceeds the number of columns in the matrix passed in as parameter.

func ColsStdev

func ColsStdev(cols int, m *mat.Dense) ([]float64, error)

ColsStdev returns a slice of standard deviations of first cols matrix columns It returns error if passed in matrix is nil or has zero size or requested number of columns exceeds the number of columns in matrix m.

func MakeConstant

func MakeConstant(rows, cols int, val float64) (*mat.Dense, error)

MakeConstant returns a matrix of rows x cols whose each element is set to val. MakeConstant fails if invalid matrix dimensions are requested.

func MakeRandom

func MakeRandom(rows, cols int, min, max float64) (*mat.Dense, error)

MakeRandom creates a new matrix with provided number of rows and columns which is initialized to random numbers uniformly distributed in interval [min, max]. MakeRandom fails if non-positive matrix dimensions are requested.

func RowsMax

func RowsMax(rows int, m *mat.Dense) ([]float64, error)

RowsMax returns a slice of max values of first rows matrix rows. It returns error if passed in matrix is nil or has zero size or requested number of rows exceeds the number of rows in matrix m.

func RowsMin

func RowsMin(rows int, m *mat.Dense) ([]float64, error)

RowsMin returns a slice of min values of first rows matrix rows. It returns error if passed in matrix is nil or has zero size or requested number of rows exceeds the number of rows in matrix m.

Types

This section is empty.

Jump to

Keyboard shortcuts

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