[Home] Type Microsoft.FSharp.Math.Matrix


The type of matrices. The arithmetic operations on the element type are determined by inspection on the element type itself. Two representations are supported: sparse and dense.

Full Type Signature

[<SealedAttribute ()>]
type Matrix<'T>
with
  interface IEnumerable<'T>
  interface IStructuralEquatable
  interface IStructuralComparable
  interface IComparable
  member Column : index:int -> Vector<'T>
  member Columns : start:int * length:int -> Matrix<'T>
  member Copy : unit -> Matrix<'T>
  override Equals : obj -> bool
  member GetDiagonal : int -> Vector<'T>
  override GetHashCode : unit -> int
  member GetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option -> Matrix<'T>
  member PermuteColumns : permutation:(int -> int) -> Matrix<'T>
  member PermuteRows : permutation:(int -> int) -> Matrix<'T>
  member Region : starti:int * startj:int * lengthi:int * lengthj:int -> Matrix<'T>
  member Row : index:int -> RowVector<'T>
  member Rows : start:int * length:int -> Matrix<'T>
  member
    SetSlice : start1:int option * finish1:int option * start2:int option * finish2:int option * Matrix<'T> ->
                 unit
  member ToArray2 : unit -> 'T [,]
  member ToRowVector : unit -> RowVector<'T>
  member ToVector : unit -> Vector<'T>
  member Diagonal : Vector<'T>
  member Dimensions : int * int
  member ElementOps : INumeric<'T>
  member InternalDenseValues : 'T [,]
  member InternalSparseColumnValues : int []
  member InternalSparseRowOffsets : int []
  member InternalSparseValues : 'T []
  member IsDense : bool
  member IsSparse : bool
  member Item : int * int -> 'T with get
  member NonZeroEntries : seq<int * int * 'T>
  member Norm : float
  member NumCols : int
  member NumRows : int
  member Transpose : Matrix<'T>
  member Item : int * int -> 'T with set
  static member ( + ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
  static member ( .* ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
  static member ( * ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
  static member ( * ) : Matrix<'T> * 'T -> Matrix<'T>
  static member ( * ) : Matrix<'T> * Vector<'T> -> Vector<'T>
  static member ( * ) : 'T * Matrix<'T> -> Matrix<'T>
  static member ( - ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
  static member ( ~- ) : Matrix<'T> -> Matrix<'T>
  static member ( ~+ ) : Matrix<'T> -> Matrix<'T>
end

Instance Members

MemberDescription
member Column : index:int -> Vector<'T>
Select a column from a matrix
member Columns : start:int * length:int -> Matrix<'T>
Select a range of columns from a matrix
member Copy : unit -> Matrix<'T>
Create a new matrix that is a copy of the given array
member Diagonal : Vector<'T>
Get the main diagonal of a matrix, as a vector
member Dimensions : int * int
Get the number of (rows,columns) in the matrix
member ElementOps : INumeric<'T>
Retrieve the dictionary of numeric operations associated with the element type of this matrix. Accessing the property may raise an NotSupportedException if the element type doesn't support any numeric operations. The object returned may support additional numeric operations such as IFractional: this can be determined by a dynamic type test against the object returned.
override Equals : obj -> bool
member GetDiagonal : int -> Vector<'T>
Return the nth diagonal of a matrix, as a vector. Diagonal 0 is the primary diagonal, positive diagonals are further to the upper-right of the matrix.
override GetHashCode : unit -> int
member
  GetSlice : start1:int option * finish1:int option * start2:int option *
             finish2:int option -> Matrix<'T>
Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2]'
member InternalDenseValues : 'T [,]
Get the internal array of values for a dense matrix. This property should only be used when interoperating with other matrix libraries.
member InternalSparseColumnValues : int []
Get the internal array of column values for a sparse matrix. This property should only be used when interoperating with other matrix libraries.
member InternalSparseRowOffsets : int []
Get the internal array of row offsets for a sparse matrix. This property should only be used when interoperating with other matrix libraries.
member InternalSparseValues : 'T []
Get the internal array of values for a sparse matrix. This property should only be used when interoperating with other matrix libraries.
member IsDense : bool
Indicates if the matrix uses the dense representation.
member IsSparse : bool
Indicates if the matrix uses the sparse representation.
member Item : int * int -> 'T with get
Get the item at the given position in the matrix
member Item : int * int -> 'T with set
Get the item at the given position in the matrix
member NonZeroEntries : seq<int * int * 'T>
Return the non-zero entries of a sparse or dense matrix
member Norm : 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)).
member NumCols : int
Get the number of columns in the matrix
member NumRows : int
Get the number of rows in the matrix
member PermuteColumns : permutation:(int -> int) -> Matrix<'T>
Permutes the columns of the matrix.
member PermuteRows : permutation:(int -> int) -> Matrix<'T>
Permutes the rows of the matrix.
member
  Region : starti:int * startj:int * lengthi:int * lengthj:int ->
             Matrix<'T>
Select a region from a matrix
member Row : index:int -> RowVector<'T>
Select a row from a matrix
member Rows : start:int * length:int -> Matrix<'T>
Select a range of rows from a matrix
member
  SetSlice : start1:int option * finish1:int option * start2:int option *
             finish2:int option * Matrix<'T> -> unit
Supports the slicing syntax 'A.[idx1..idx2,idx1..idx2] <- B'
member ToArray2 : unit -> 'T [,]
Return a new array containing the elements of the given matrix
member ToRowVector : unit -> RowVector<'T>
Convert the matrix to a row vector
member ToVector : unit -> Vector<'T>
Convert the matrix to a column vector
member Transpose : Matrix<'T>
Get the transpose of the matrix.

Static Members

MemberDescription
member ( * ) : 'T * Matrix<'T> -> Matrix<'T>
Multiply each element of a matrix by the given scalar value
member ( * ) : Matrix<'T> * 'T -> Matrix<'T>
Multiply each element of a matrix by the given scalar value
member ( * ) : Matrix<'T> * Vector<'T> -> Vector<'T>
Matrix-vector multiplication.
member ( * ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
Matrix multiplication. An InvalidArgument exception will be raised if the dimensions do not match.
member ( + ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
Point-wise addition of two matrices. An InvalidArgument exception will be raised if the dimensions do not match.
member ( - ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
Point-wise subtraction of two matrices. An InvalidArgument exception will be raised if the dimensions do not match.
member ( .* ) : Matrix<'T> * Matrix<'T> -> Matrix<'T>
Pointwise matrix multiplication. An InvalidArgument exception will be raised if the dimensions do not match.
member ( ~+ ) : Matrix<'T> -> Matrix<'T>
Prefix '+' operator. A nop.
member ( ~- ) : Matrix<'T> -> Matrix<'T>
Matrix negation.

See Also

Microsoft.FSharp.Math


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