FsAlg


Matrix<'T>

Generic matrix type

Union Cases

Union CaseDescription
Matrix(^T [,])
Signature: ^T [,]
ZeroMatrix(^T)
Signature: ^T

Instance members

Instance memberDescription
Cols
Signature: int

Gets the number of columns of this matrix

Copy()
Signature: unit -> Matrix<^T>

Creates a copy of this matrix

GetDeterminant()
Signature: unit -> ^T

Gets the determinant of this matrix

GetDiagonal()
Signature: unit -> ^T []

Gets a vector of the diagonal elements of this matrix

GetEigenvalues()
Signature: unit -> ^T []

Returns the eigenvalues of this matrix. (Experimental code, complex eigenvalues are not supported.)

GetEnumerator()
Signature: unit -> IEnumerator<^T>

Returns an enumerator that iterates through this matrix

GetInverse()
Signature: unit -> Matrix<^T>

Gets the inverse of this matrix

GetLUDecomposition()
Signature: unit -> Matrix<^T> * int [] * ^T

Returns the LU decomposition of this matrix. The return values are the LU matrix, pivot indices, and a toggle value indicating the number of row exchanges during the decomposition, which is +1 if the number of exchanges were even, -1 if odd.

GetQRDecomposition()
Signature: unit -> Matrix<^T> * Matrix<^T>

Returns the QR decomposition of this matrix

GetSlice(rowStart, rowFinish, col)
Signature: (rowStart:int option * rowFinish:int option * col:int) -> Matrix<^T>

Gets a column of this matrix with the given column index col and row bounds rowStart and rowFinish

GetSlice(row, colStart, colFinish)
Signature: (row:int * colStart:int option * colFinish:int option) -> Matrix<^T>

Gets a row of this matrix with the given row index row and column bounds colStart and colFinish

GetSlice(...)
Signature: (rowStart:int option * rowFinish:int option * colStart:int option * colFinish:int option) -> Matrix<^T>

Gets a submatrix of this matrix with the bounds given in rowStart, rowFinish, colStart, colFinish

GetTrace()
Signature: unit -> ^T

Gets the trace of this matrix

GetTranspose()
Signature: unit -> Matrix<^T>

Gets the transpose of this matrix

[i, j]
Signature: i:int * j:int -> ^T

The entry of this matrix at row i and column j

[i]
Signature: i:int -> int

The entry of this matrix at row i and column j

Rows
Signature: int

Gets the number of rows of this matrix

ToArray()
Signature: unit -> ^T [] []

Converts this matrix into a jagged array, e.g. from Matrix to float[][]

ToArray2D()
Signature: unit -> ^T [,]

Converts this matrix into a 2d array

ToMathematicaString()
Signature: unit -> string

Gets a string representation of this matrix that can be pasted into a Mathematica notebook

ToMatlabString()
Signature: unit -> string

Gets a string representation of this matrix that can be pasted into MATLAB

ToSeq()
Signature: unit -> seq<^T>

Converts this matrix into a one dimensional sequence, scanning columns from left to right and rows from top to bottom

Static members

Static memberDescription
( - )(a, b)
Signature: (a:^T * b:Matrix<^T>) -> Matrix<^T>

Subtracts each element of of matrix b from scalar a

( - )(a, b)
Signature: (a:Matrix<^T> * b:^T) -> Matrix<^T>

Subtracts scalar b from each element of matrix a

( - )(a, b)
Signature: (a:Matrix<^T> * b:Matrix<^T>) -> Matrix<^T>

Subtracts matrix b from matrix a

( * )(a, b)
Signature: (a:^T * b:Matrix<^T>) -> Matrix<^T>

Multiplies each element of matrix b by scalar a

( * )(a, b)
Signature: (a:Matrix<^T> * b:^T) -> Matrix<^T>

Multiplies each element of matrix a by scalar b

( * )(a, b)
Signature: (a:Vector<^T> * b:Matrix<^T>) -> Vector<^T>

Computes the vector-matrix product of vector a and matrix b

( * )(a, b)
Signature: (a:Matrix<^T> * b:Vector<^T>) -> Vector<^T>

Computes the matrix-vector product of matrix a and vector b

( * )(a, b)
Signature: (a:Matrix<^T> * b:Matrix<^T>) -> Matrix<^T>

Multiplies matrix a and matrix b (matrix product)

( .* )(a, b)
Signature: (a:Matrix<^T> * b:Matrix<^T>) -> Matrix<^T>

Multiplies matrix a and matrix b element-wise (Hadamard product)

( ./ )(a, b)
Signature: (a:Matrix<^T> * b:Matrix<^T>) -> Matrix<^T>

Divides matrix a by matrix b element-wise (Hadamard division)

( / )(a, b)
Signature: (a:^T * b:Matrix<^T>) -> Matrix<^T>

Creates a matrix whose elements are scalar a divided by each element of matrix b

( / )(a, b)
Signature: (a:Matrix<^T> * b:^T) -> Matrix<^T>

Divides each element of matrix a by scalar b

( ~- )(a)
Signature: a:Matrix<^T> -> Matrix<^T>

Gets the negative of matrix a

( + )(a, b)
Signature: (a:^T * b:Matrix<^T>) -> Matrix<^T>

Adds scalar a to each element of matrix b

( + )(a, b)
Signature: (a:Matrix<^T> * b:^T) -> Matrix<^T>

Adds scalar b to each element of matrix a

( + )(a, b)
Signature: (a:Matrix<^T> * b:Matrix<^T>) -> Matrix<^T>

Adds matrix a to matrix b

op_Explicit(m)
Signature: m:Matrix<^T> -> float [,]

Converts Matrix m to float[,]

Zero
Signature: Matrix<^T>

ZeroMatrix