Value | Description |
val add : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Matrix addition.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val compare : Matrix<'a> -> Matrix<'a> -> int | |
val constDiag : int -> 'a -> Matrix<'a> |
Create a diagonal square matrix containing the given value along the diagonal.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val copy : Matrix<'a> -> Matrix<'a> |
Create a new matrix that is a copy of the given array
|
val cptMax : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Take the pointwise maximum of two matrices
|
val cptMin : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Take the pointwise maximum of two matrices
|
val cptMul : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Matrix pointwise-multiplication.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val create : int -> int -> 'a -> Matrix<'a> |
Create a matrix containing the given value at every element.
|
val diag : Vector<'a> -> Matrix<'a> |
Create a matrix containing the given vector along the diagonal.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val dims : Matrix<'a> -> int * int |
Get the number of (rows,columns) in a matrix.
|
val dot : Matrix<'a> -> Matrix<'a> -> 'a |
Sum of the point-wise multiple of the two matrices.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val eops : Matrix<'a> -> INumeric<'a> |
Get the dictionary of operations assocaited with the element type
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val exists : ('a -> bool) -> Matrix<'a> -> bool | |
val existsi : (int -> int -> 'a -> bool) -> Matrix<'a> -> bool | |
val fold : ('b -> 'a -> 'b) -> 'b -> Matrix<'a> -> 'b | |
val foldi : (int -> int -> 'b -> 'a -> 'b) -> 'b -> Matrix<'a> -> 'b | |
val forall : ('a -> bool) -> Matrix<'a> -> bool | |
val foralli : (int -> int -> 'a -> bool) -> Matrix<'a> -> bool | |
val get : Matrix<'a> -> int -> int -> 'a |
Get an element from a matrix. The indexes are given in row/column order.
|
val getCol : Matrix<'a> -> int -> Vector<'a> |
Select a column from a matrix
|
val getCols : Matrix<'a> -> int -> int -> Matrix<'a> |
Select a range of columns from a matrix
|
val getDiag : Matrix<'a> -> Vector<'a> |
Return the diagonal of a matrix as a vector
|
val getDiagN : Matrix<'a> -> int -> Vector<'a> |
Return the nth diagonal of a matrix as a vector
The 0th index is the main diagonal, and higher indexes are further to the upper-right of the matrix.
|
val getRegion : Matrix<'a> -> int -> int -> int -> int -> Matrix<'a> |
Select a region from a matrix
|
val getRow : Matrix<'a> -> int -> RowVector<'a> |
Select a row from a matrix
|
val getRows : Matrix<'a> -> int -> int -> Matrix<'a> |
Select a range of rows from a matrix
|
val hash : Matrix<'a> -> int | |
val identity : int -> Matrix<'a> |
Create a square matrix with the one for the element type lying on diagonal
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val init : int -> int -> (int -> int -> 'a) -> Matrix<'a> |
Create a matrix using the given function to compute the item at each index.
|
val init_dense : int -> int -> #seq<int * int * 'a> -> Matrix<'a> | |
val init_numeric :
int -> int -> (INumeric<'a> -> int -> int -> 'a) -> Matrix<'a> |
Create a matrix using the given function to compute the item at each index.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
The function is passed the dictionary of associated operations in addition to the index pair.
|
val init_sparse : int -> int -> #seq<int * int * 'a> -> Matrix<'a> | |
val inplace_add : Matrix<'a> -> Matrix<'a> -> unit | |
val inplace_assign : (int -> int -> 'a) -> Matrix<'a> -> unit | |
val inplace_cptMul : Matrix<'a> -> Matrix<'a> -> unit | |
val inplace_mapi : (int -> int -> 'a -> 'a) -> Matrix<'a> -> unit | |
val inplace_scale : 'a -> Matrix<'a> -> unit | |
val inplace_sub : Matrix<'a> -> Matrix<'a> -> unit | |
val map : ('a -> 'a) -> Matrix<'a> -> Matrix<'a> | |
val mapi : (int -> int -> 'a -> 'a) -> Matrix<'a> -> Matrix<'a> | |
val mul : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Matrix multiplication.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val mulRV : RowVector<'a> -> Matrix<'a> -> RowVector<'a> |
Matrix multiplication.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val mulV : Matrix<'a> -> Vector<'a> -> Vector<'a> |
Matrix multiplication.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val ncols : Matrix<'a> -> int |
Get the number of columns in a matrix.
|
val neg : Matrix<'a> -> Matrix<'a> | |
val nonzero_entries : Matrix<'a> -> seq<int * int * 'a> | |
val norm : Matrix<'a> -> float |
Returns sqrt(sum(norm(x)*(norm(x))) of all the elements of a matrix.
The element type of the matrix must have an associated instance of INormFloat<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val nrows : Matrix<'a> -> int |
Get the number of rows in a matrix.
|
val of_array2 : 'a [,] -> Matrix<'a> |
Create a matrix from the given (usually constant) data
|
val of_list : 'a list list -> Matrix<'a> |
Create a matrix from the given (usually constant) data
|
val of_rowvec : RowVector<'a> -> Matrix<'a> | |
val of_scalar : 'a -> Matrix<'a> |
Create a 1x1 matrix containing the given value
|
val of_seq : #seq<'c> -> Matrix<'a> when 'c :> seq<'a> | |
val of_vector : Vector<'a> -> Matrix<'a> | |
val prod : Matrix<'a> -> 'a | |
val scale : 'a -> Matrix<'a> -> Matrix<'a> | |
val set : Matrix<'a> -> int -> int -> 'a -> unit |
Set an element in a matrix. The indexes are given in row/column order.
|
val sub : Matrix<'a> -> Matrix<'a> -> Matrix<'a> |
Matrix subtraction.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|
val sum : Matrix<'a> -> 'a | |
val to_array2 : Matrix<'a> -> 'a [,] |
Return a new array containing the elements of the given matrix
|
val to_rowvec : Matrix<'a> -> RowVector<'a> | |
val to_scalar : Matrix<'a> -> 'a | |
val to_vector : Matrix<'a> -> Vector<'a> | |
val trace : Matrix<'a> -> 'a | |
val transpose : Matrix<'a> -> Matrix<'a> | |
val zero : int -> int -> Matrix<'a> |
Create a matrix containing the zero element at each index.
The element type of the matrix must have an associated instance of INumeric<'a> (see [[GlobalAssociations]]) ((else NotSupportedException)).
|