matrix

package module
v0.0.0-...-ab4f27c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 3 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 {
	Matrix [][]float64
	// contains filtered or unexported fields
}

Matrix it works only with float64 type

func NewFromArray

func NewFromArray(array []float64) Matrix

NewFromArray hmm

func NewMatrix

func NewMatrix(col, row int) Matrix

NewMatrix function for creating a Matrix after import that package you can use it by type........ myMatrix := Matrix.NewMatrix(1, 3)

func (*Matrix) AddFromMatrix

func (m *Matrix) AddFromMatrix(sMatrix Matrix) (Matrix, error)

AddFromMatrix is a function to sum two matrices

func (*Matrix) Create

func (m *Matrix) Create(col int, row int) Matrix

Create is a function to create new matrix....if it already created the matrix gonna change completley

func (*Matrix) DotProduct

func (m *Matrix) DotProduct(sMatrix Matrix) (Matrix, error)

DotProduct is a dot product function =

func (*Matrix) FromArray

func (m *Matrix) FromArray(array []float64)

FromArray it used to convert matrix completely to fit the array

func (*Matrix) HadProduct

func (m *Matrix) HadProduct(sMatrix Matrix) (Matrix, error)

HadProduct is hadamard product

func (*Matrix) Map

func (m *Matrix) Map(f func(float64) float64) Matrix

Map takes a function and preform the function for every single value in the matrix

func (*Matrix) Multiply

func (m *Matrix) Multiply(n float64) Matrix

Multiply is a function to multiply a value by every single value in the matrix

func (*Matrix) Randomize

func (m *Matrix) Randomize()

Randomize is function to randomize the matrix

func (*Matrix) StaticAddFromMatrix

func (m *Matrix) StaticAddFromMatrix(sMatrix Matrix) (Matrix, error)

StaticAddFromMatrix is a static version of SuptractMatrix()

func (*Matrix) StaticDotProduct

func (m *Matrix) StaticDotProduct(sMatrix Matrix) (Matrix, error)

StaticDotProduct it's static version of DotProduct

func (*Matrix) StaticHadProduct

func (m *Matrix) StaticHadProduct(sMatrix Matrix) (Matrix, error)

StaticHadProduct is a static version of HadProduct()

func (*Matrix) StaticMap

func (m *Matrix) StaticMap(f func(float64) float64) Matrix

StaticMap static version of Map(float64)

func (*Matrix) StaticRandomize

func (m *Matrix) StaticRandomize() Matrix

StaticRandomize is a static version of Randomize()

func (*Matrix) StaticSuptractMatrix

func (m *Matrix) StaticSuptractMatrix(sMatrix Matrix) (Matrix, error)

StaticSuptractMatrix is a static version of SuptractMatrix()

func (*Matrix) StaticTranspose

func (m *Matrix) StaticTranspose() (Matrix, error)

StaticTranspose is a static version of Transpose()

func (*Matrix) SuptractMatrix

func (m *Matrix) SuptractMatrix(sMatrix Matrix) (Matrix, error)

SuptractMatrix is a function that subtract two matrices from each other

func (*Matrix) Transpose

func (m *Matrix) Transpose() (Matrix, error)

Transpose is a function that transpose the matrix

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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