[Home] Module Microsoft.FSharp.Math.Matrix.Generic


Operations to manipulate matrix types carrying arbitrary element types. The names and types of the operations match those in the containing module Math.Matrix. The numeric operations on the element type (add, zero etc.) are inferred from the type argument itself. That is, for some operations the element type of the matrix must have an associated instance of INumeric<'T> or some more specific numeric association (see GlobalAssociations) ((else NotSupportedException)).

Values

ValueDescription
val copy : Matrix<'T> -> Matrix<'T>
Create a new matrix that is a copy of the given array
val cptMax : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
Take the pointwise maximum of two matrices
val cptMin : Matrix<'T> -> Matrix<'T> -> Matrix<'T>
Take the pointwise maximum of two matrices
val create : int -> int -> 'T -> Matrix<'T>
Create a matrix containing the given value at every element.
val dot : Matrix<'T> -> Matrix<'T> -> 'T
Sum of the point-wise multiple of the two matrices. The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
val exists : ('T -> bool) -> Matrix<'T> -> bool
val existsi : (int -> int -> 'T -> bool) -> Matrix<'T> -> bool
val fold : ('State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
val foldi :
  (int -> int -> 'State -> 'T -> 'State) -> 'State -> Matrix<'T> -> 'State
val forall : ('T -> bool) -> Matrix<'T> -> bool
val foralli : (int -> int -> 'T -> bool) -> Matrix<'T> -> bool
val get : Matrix<'T> -> int -> int -> 'T
Get an element from a matrix. The indexes are given in row/column order.
val identity : int -> Matrix<'T>
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<'T> (see GlobalAssociations) ((else NotSupportedException)).
val init : int -> int -> (int -> int -> 'T) -> Matrix<'T>
Create a matrix using the given function to compute the item at each index.
val initDense : int -> int -> seq<int * int * 'T> -> Matrix<'T>
val initDiagonal : Vector<'T> -> Matrix<'T>
Create a matrix containing the given vector along the diagonal. The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).
val initNumeric :
  int -> int -> (INumeric<'T> -> int -> int -> 'T) -> Matrix<'T>
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<'T> (see GlobalAssociations) ((else NotSupportedException)). The function is passed the dictionary of associated operations in addition to the index pair.
val initSparse : int -> int -> seq<int * int * 'T> -> Matrix<'T>
val inplace_add : Matrix<'T> -> Matrix<'T> -> unit
val inplace_sub : Matrix<'T> -> Matrix<'T> -> unit
val map : ('T -> 'T) -> Matrix<'T> -> Matrix<'T>
val mapi : (int -> int -> 'T -> 'T) -> Matrix<'T> -> Matrix<'T>
val norm : Matrix<'T> -> 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<'T> (see GlobalAssociations) ((else NotSupportedException)).
val of_array2 : 'T [,] -> Matrix<'T>
Create a matrix from the given (usually constant) data
val of_list : 'T list list -> Matrix<'T>
Create a matrix from the given (usually constant) data
val of_rowvec : RowVector<'T> -> Matrix<'T>
val of_scalar : 'T -> Matrix<'T>
Create a 1x1 matrix containing the given value
val of_seq : seq<#seq<'T>> -> Matrix<'T>
val of_vector : Vector<'T> -> Matrix<'T>
val prod : Matrix<'T> -> 'T
val set : Matrix<'T> -> int -> int -> 'T -> unit
Set an element in a matrix. The indexes are given in row/column order.
val sum : Matrix<'T> -> 'T
val to_array2 : Matrix<'T> -> 'T [,]
Return a new array containing the elements of the given matrix
val to_rowvec : Matrix<'T> -> RowVector<'T>
val to_scalar : Matrix<'T> -> 'T
val to_vector : Matrix<'T> -> Vector<'T>
val trace : Matrix<'T> -> 'T
val transpose : Matrix<'T> -> Matrix<'T>
Return a new matrix which is the transpose of the input matrix
val zero : int -> int -> Matrix<'T>
Create a matrix containing the zero element at each index. The element type of the matrix must have an associated instance of INumeric<'T> (see GlobalAssociations) ((else NotSupportedException)).

See Also

Microsoft.FSharp.Math.Matrix


Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16