matrix

package
v0.0.2-0...-db6250e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: CC0-1.0, CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Column

func Column(R Space, x object.Element, i int) ([]object.Element, error)

Column returns the i-th column of the matrix x. Columns are indexed from 0. It returns an error if the index i is out of range. The entries are elements of the ring containing the entries of the matrices in R. If R satisfies the interface:

type Columner interface {
	Column(x object.Element, i int) ([]object.Element, error) // Column
	   returns the i-th column of the matrix x. Columns are indexed
	   from 0. It returns an error if the index i is out of range. The
	   entries are elements of the ring containing the entries of the
	   matrices.
}

then R's Column method will be used.

func Columns

func Columns(R Space, x object.Element) ([][]object.Element, error)

Columns returns the columns of the matrix x. The entries are elements of the ring containing the entries of the matrices in R. If R satisfies the interface:

type Columnser interface {
	Columns(x object.Element) ([][]object.Element, error) // Columns
	   returns the columns of the matrix x. The entries are elements of
	   the ring containing the entries of the matrices.
}

then R's Columns method will be used.

func Entries

func Entries(R Space, x object.Element) ([]object.Element, error)

Entries returns the entries of the matrix x, row by row. The entries are elements of the ring containing the entries of the matrices in R. If R satisfies the interface:

type Entrieser interface {
	Entries(x object.Element) ([]object.Element, error) // Entries
	   returns the entries of the matrix x, row by row. The entries are
	   elements of the ring containing the entries of the matrices.
}

then R's Entries method will be used.

func Row

func Row(R Space, x object.Element, i int) ([]object.Element, error)

Row returns the i-th row of the matrix x. Rows are indexed from 0. It returns an error if the index i is out of range. The entries are elements of the ring containing the entries of the matrices in R. If R satisfies the interface:

type Rower interface {
	Row(x object.Element, i int) ([]object.Element, error) // Row
	   returns the i-th row of the matrix x. Rows are indexed from 0.
	   It returns an error if the index i is out of range. The entries
	   are elements of the ring containing the entries of the matrices.
	}

then R's Row method will be used.

func Rows

func Rows(R Space, x object.Element) ([][]object.Element, error)

Rows returns the rows of the matrix x. The entries are elements of the ring containing the entries of the matrices in R. If R satisfies the interface:

type Rowser interface {
	Rows(x object.Element) ([][]object.Element, error) // Rows returns
	   the rows of the matrix x. The entries are elements of the ring
	   containing the entries of the matrices.
}

then R's Rows method will be used.

Types

type Algebra

type Algebra interface {
	ring.Interface
	Common
	Inverse(x object.Element) (object.Element, error) // Inverse returns the inverse x^-1 of x, or an error.
}

Algebra defines the interface that all matrix algebras must satisfy.

type Common

type Common interface {
	NumberOfRowsColumns
	Entry(x object.Element, i int, j int) (object.Element, error)                           // Entry returns the (i,j)-th entry of the matrix x. Rows and columns are indexed from zero. It returns an error if either i or j is negative or too large (i.e. if i and j refer to a non-existent entry of x). The returned entry is an element of the ring containing the entries of the matrices.
	ScalarMultiplyByCoefficient(c object.Element, x object.Element) (object.Element, error) // ScalarMultiplyByCoefficient returns c * x, where c is an element in the ring containing the entries of the matrices.
	Transpose(x object.Element) (object.Element, error)                                     // Transpose returns the transpose of the matrix x. Note that the transpose might not lie in the same parent as x.
	Determinant(x object.Element) (object.Element, error)                                   // Determinant returns the determinant of the matrix x. This is given as an element in the ring of entries.
	Ring() ring.Interface                                                                   // Ring returns the ring containing the entries of the matrices in this matrix space.
	FromSlice(S []object.Element) (object.Element, error)                                   // FromSlice attempts to convert the slice S to a matrix, row by row.
}

Common defines the interfaces common to a Space and Algebra.

type Element

type Element interface {
	object.Element
	NumberOfRowsColumns
}

Element defines the interface that all matrices must satisfy.

type NumberOfRowsColumns

type NumberOfRowsColumns interface {
	NumberOfRows() int    // NumberOfRows returns the number of rows of a matrix in this matrix space.
	NumberOfColumns() int // NumberOfColumns returns the number of columns of a matrix in this matrix space.
}

NumberOfRowsColumns is the interface satisfied by the NumberOfRows and NumberOfColumns methods.

type Space

type Space interface {
	abeliangroup.Interface
	Common
}

Space defines the interface that all matrix spaces must satisfy.

Directories

Path Synopsis
fpmatrix
integermatrix
internal

Jump to

Keyboard shortcuts

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