Matrix
Operations on Matrix type. (Implementing functionality similar to Microsoft.FSharp.Collections.Array2D)
Functions and values
Function or value | Description |
appendCol(v m)
Signature: v:Vector<^T> -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns a matrix where vector |
appendRow(v m)
Signature: v:Vector<^T> -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns a matrix where vector |
col(j m)
Signature: j:int -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns the j-th column of matrix |
cols(m)
Signature: m:Matrix<^T> -> int
Type parameters: ^T |
Returns the number of columns in matrix |
copy(m)
Signature: m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Creates a copy of Matrix |
create(m n v)
Signature: m:int -> n:int -> v:^T -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
createRows(m v)
Signature: m:int -> v:^T [] -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
decomposeLU(m)
Signature: m:Matrix<^T> -> Matrix<^T> * int [] * ^T
Type parameters: ^T |
Gets the LU decomposition of matrix |
decomposeQR(m)
Signature: m:Matrix<^T> -> Matrix<^T> * Matrix<^T>
Type parameters: ^T |
Gets the QR decomposition of matrix |
det(m)
Signature: m:Matrix<^T> -> ^T
Type parameters: ^T |
Gets the determinant of matrix |
diagonal(m)
Signature: m:Matrix<^T> -> Vector<^T>
Type parameters: ^T |
Gets the diagonal elements of matrix |
eigenvalues(m)
Signature: m:Matrix<^T> -> Vector<^T>
Type parameters: ^T |
Gets the eigenvalues of matrix |
get(m i j)
Signature: m:Matrix<^T> -> i:int -> j:int -> ^T
Type parameters: ^T |
Gets the entry of matrix |
identity(m)
Signature: m:int -> Matrix<^T>
Type parameters: ^T |
Creates the identity matrix with |
init(m n f)
Signature: m:int -> n:int -> f:(int -> int -> ^T) -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
initCols(n f)
Signature: n:int -> f:(int -> Vector<^T>) -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
initRows(m f)
Signature: m:int -> f:(int -> Vector<^T>) -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
initSymmetric(m f)
Signature: m:int -> f:(int -> int -> ^T) -> Matrix<^T>
Type parameters: ^T |
Creates a square matrix with |
inverse(m)
Signature: m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Gets the inverse of matrix |
iter(f m)
Signature: f:(^T -> unit) -> m:Matrix<^T> -> unit
Type parameters: ^T |
Applies function |
iteri(f m)
Signature: f:(int -> int -> ^T -> unit) -> m:Matrix<^T> -> unit
Type parameters: ^T |
Applies function |
length1(m)
Signature: m:Matrix<^T> -> int
Type parameters: ^T |
Returns the number of rows in matrix |
length2(m)
Signature: m:Matrix<^T> -> int
Type parameters: ^T |
Returns the number of columns in matrix |
map(f m)
Signature: f:(^T -> ^U) -> m:Matrix<^T> -> Matrix<^U>
Type parameters: ^T, ^U |
Creates a matrix whose entries are the results of applying function |
mapi(f m)
Signature: f:(int -> int -> ^T -> ^U) -> m:Matrix<^T> -> Matrix<^U>
Type parameters: ^T, ^U |
Creates a matrix whose entries are the results of applying function |
ofArray(m a)
Signature: m:int -> a:^T [] -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
ofArray2D(m)
Signature: m:^T [,] -> Matrix<^T>
Type parameters: ^T |
Creates a matrix from 2d array |
ofArrayArray(m)
Signature: m:^T [] [] -> Matrix<^T>
Type parameters: ^T |
Creates a matrix from a jagged array, e.g. from float[][] to Matrix |
ofCols(v)
Signature: v:seq<Vector<^T>> -> Matrix<^T>
Type parameters: ^T |
Constructs a matrix out of a sequence of column vectors |
ofRows(v)
Signature: v:seq<Vector<^T>> -> Matrix<^T>
Type parameters: ^T |
Constructs a matrix out of a sequence of row vectors |
ofSeq(m s)
Signature: m:int -> s:seq<^T> -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
ofSeqSeq(s)
Signature: s:seq<seq<^T>> -> Matrix<^T>
Type parameters: ^T |
Creates a matrix from sequence of sequences |
ofVector(m v)
Signature: m:int -> v:Vector<^T> -> Matrix<^T>
Type parameters: ^T |
Creates a matrix with |
prependCol(v m)
Signature: v:Vector<^T> -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns a matrix where vector |
prependRow(v m)
Signature: v:Vector<^T> -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns a matrix where vector |
replace(f m)
Signature: f:(^T -> ^T) -> m:Matrix<^T> -> unit
Type parameters: ^T |
Replaces the elements of matrix |
replace2(f m1 m2)
Signature: f:(^T1 -> ^T2 -> ^T1) -> m1:Matrix<^T1> -> m2:Matrix<^T2> -> unit
Type parameters: ^T1, ^T2 |
Replaces the elements of matrix |
replacei(f m)
Signature: f:(int -> int -> ^T -> ^T) -> m:Matrix<^T> -> unit
Type parameters: ^T |
Replaces the elements of matrix |
replacei2(f m1 m2)
Signature: f:(int -> int -> ^T1 -> ^T2 -> ^T1) -> m1:Matrix<^T1> -> m2:Matrix<^T2> -> unit
Type parameters: ^T1, ^T2 |
Replaces the elements of matrix |
replaceWith(m1 m2)
Signature: m1:Matrix<^T> -> m2:Matrix<^T> -> unit
Type parameters: ^T |
Replaces the elements of matrix |
row(i m)
Signature: i:int -> m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Returns the i-th row of matrix |
rows(m)
Signature: m:Matrix<^T> -> int
Type parameters: ^T |
Returns the number of rows in matrix |
set(m i j a)
Signature: m:Matrix<^T> -> i:int -> j:int -> a:^T -> unit
Type parameters: ^T |
Sets the entry of matrix |
solve(a b)
Signature: a:Matrix<^T> -> b:Vector<^T> -> Vector<^T>
Type parameters: ^T |
Solves a system of linear equations ax = b, where the coefficients are given in matrix |
toArray(m)
Signature: m:Matrix<^T> -> ^T []
Type parameters: ^T |
Converts matrix |
toArray2D(m)
Signature: m:Matrix<^T> -> ^T [,]
Type parameters: ^T |
Converts matrix |
toArrayArray(m)
Signature: m:Matrix<^T> -> ^T [] []
Type parameters: ^T |
Converts matrix |
toCols(m)
Signature: m:Matrix<^T> -> seq<Matrix<^T>>
Type parameters: ^T |
Returns the columns of matrix |
toRows(m)
Signature: m:Matrix<^T> -> seq<Matrix<^T>>
Type parameters: ^T |
Returns the rows of matrix |
toSeq(m)
Signature: m:Matrix<^T> -> seq<^T>
Type parameters: ^T |
Converts matrix |
toSeqSeq(m)
Signature: m:Matrix<^T> -> seq<seq<^T>>
Type parameters: ^T |
Converts matrix |
toVector(m)
Signature: m:Matrix<^T> -> Vector<^T>
Type parameters: ^T |
Converts matrix |
trace(m)
Signature: m:Matrix<^T> -> ^T
Type parameters: ^T |
Gets the trace of matrix |
transpose(m)
Signature: m:Matrix<^T> -> Matrix<^T>
Type parameters: ^T |
Gets the transpose of matrix |