Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Matrix ¶
type Matrix interface { // Returns dimensions of Matrix. Dim() (rows, cols int) // Returns number of elements of Matrix TotalElements() int // Returns true is a Matrix is square, Else false IsSquare() bool // Returns if a matrix is an Identity Matrix IsIdentity() bool // Returns Number of rows GetNumRows() int // Returns Number of columns GetNumCols() int // Type of Matrix Type() gcv.Type // Transpose of a Matrix Trans() // Conjuate of a Matrix Conj() // Conjugate (Hermitian) Transpose of a Matrix ConjTrans() // Returns a copy of Matrix Copy() Matrix // Returns all Elements Elements() v.Vectors // Trace of Matrix. Returns error if matrix is not square Tr() (gcv.Value, error) // Swaps two matrix rows Swap(rowA, rowB int) // Returns the Determinate of a matrix or error if matrix is not square. Det() (gcv.Value, error) // Inverse of Matrix. Returns error if there is no inverse Inv() (Matrix, error) // Get element at location (row, col) Get(row int, col int) gcv.Value // Set element at location (row, col) Set(row int, col int, value interface{}) // Aug will take either a Vector or a Matrix and will create a new augmented matrix Aug(b interface{}) Matrix // Trim will trim off rows or columns from a matrix to for a new sub matrix. // top are the number or rows to cut from the top. // bottom are the number of rows to cut from the bottom. // left are columns to cut from the left. // right are columns to cut from the right. Trim(top, bottom, left, right int) Matrix }
Matrix is the main matirx interface for real matrices.
func MakeConjMatrix ¶
MakeConjMatrix returns a new complex conjuate matrix of matrix
func MakeConjTransMatrix ¶
MakeConjTransMatrix returns a new conjugate transpose matrix of matrix
func MakeMatrix ¶
MakeMatrix returns a new matrix. takes individual v as args
func MakeMatrixAlt ¶
MakeMatrixAlt returns a new matrix of type Matrix with predefined elements. takes type Vectors as arg
func MakeTransMatrix ¶
MakeTransMatrix returns a new transpose matrix of matrix
func NewIdentityMatrix ¶
NewIdentityMatrix returns a new Identity Matrix of size (degree, degree)
Click to show internal directories.
Click to hide internal directories.