matrix

package module
v0.0.0-...-87fa60f Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 4 Imported by: 0

README

matrix

Package matrix provides matrix operations

Documentation

Overview

simple matrix package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elem

type Elem []interface{}

type FloatMatrix

type FloatMatrix struct {
	// contains filtered or unexported fields
}

func NewFloatMatrix

func NewFloatMatrix(m, n int) *FloatMatrix

New return a new FloatMatrix with the given size

func NewFloatMatrixFromElements

func NewFloatMatrixFromElements(m, n int, elements []float64) *FloatMatrix

NewFromElements return a new FloatMatrix with elemtnts

func (*FloatMatrix) At

func (mat *FloatMatrix) At(i, j int) float64

func (*FloatMatrix) Clear

func (mat *FloatMatrix) Clear()

Clear all elements to zero.

func (*FloatMatrix) Col

func (mat *FloatMatrix) Col() int

func (*FloatMatrix) Elem

func (mat *FloatMatrix) Elem() []float64

func (*FloatMatrix) Eq

func (a *FloatMatrix) Eq(b *FloatMatrix) bool

func (*FloatMatrix) Find

func (mat *FloatMatrix) Find(num float64, p chan image.Point)

func (*FloatMatrix) Mul

func (matA *FloatMatrix) Mul(matB *FloatMatrix) *FloatMatrix

func (*FloatMatrix) Row

func (mat *FloatMatrix) Row() int

func (*FloatMatrix) Set

func (mat *FloatMatrix) Set(i, j int, v float64)

Set value

func (*FloatMatrix) Size

func (mat *FloatMatrix) Size() (int, int)

func (*FloatMatrix) String

func (mat *FloatMatrix) String() string

func (*FloatMatrix) Transpose

func (mat *FloatMatrix) Transpose() *FloatMatrix

type Mat

type Mat struct {
	// contains filtered or unexported fields
}

func NewMat

func NewMat(m, n int, elem []interface{}, kind reflect.Kind) *Mat

func (*Mat) Add

func (mat *Mat) Add(matB *Mat)

func (*Mat) At

func (mat *Mat) At(i, j int) interface{}

func (*Mat) String

func (mat *Mat) String() string

type Mat2

type Mat2 struct {
	// contains filtered or unexported fields
}

func NewMat2

func NewMat2(m, n int, elem []reflect.Value) *Mat2

func (*Mat2) At

func (mat *Mat2) At(i, j int) reflect.Value

func (*Mat2) String

func (mat *Mat2) String() string

type Matrix

type Matrix interface {
	Size() (m, n int)
	Row() (m int)
	Col() (n int)
}

Jump to

Keyboard shortcuts

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