|
|
@ -4,7 +4,7 @@ |
|
|
// http://github.com/mathnet/mathnet-numerics |
|
|
// http://github.com/mathnet/mathnet-numerics |
|
|
// http://mathnetnumerics.codeplex.com |
|
|
// http://mathnetnumerics.codeplex.com |
|
|
// |
|
|
// |
|
|
// Copyright (c) 2009-2013 Math.NET |
|
|
// Copyright (c) 2009-2014 Math.NET |
|
|
// |
|
|
// |
|
|
// Permission is hereby granted, free of charge, to any person |
|
|
// Permission is hereby granted, free of charge, to any person |
|
|
// obtaining a copy of this software and associated documentation |
|
|
// obtaining a copy of this software and associated documentation |
|
|
@ -316,7 +316,6 @@ module Matrix = |
|
|
let inline subInPlace (v: #Matrix<_>) (w: #Matrix<_>) = v.Subtract(w, v) |
|
|
let inline subInPlace (v: #Matrix<_>) (w: #Matrix<_>) = v.Subtract(w, v) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Returns the sum of all elements of a matrix. |
|
|
/// Returns the sum of all elements of a matrix. |
|
|
let inline sum (A: #Matrix<'a>) = A |> foldSkipZeros (+) Matrix<'a>.Zero |
|
|
let inline sum (A: #Matrix<'a>) = A |> foldSkipZeros (+) Matrix<'a>.Zero |
|
|
|
|
|
|
|
|
@ -329,6 +328,26 @@ module Matrix = |
|
|
A.EnumerateRowsIndexed() |> Seq.map (fun (i,row) -> f i row) |> Seq.reduce (+) |
|
|
A.EnumerateRowsIndexed() |> Seq.map (fun (i,row) -> f i row) |> Seq.reduce (+) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let inline rowCount (A: #Matrix<_>) = A.RowCount |
|
|
|
|
|
let inline columnCount (A: #Matrix<_>) = A.ColumnCount |
|
|
|
|
|
|
|
|
|
|
|
let inline transpose (A: #Matrix<_>) = A.Transpose() |
|
|
|
|
|
let inline conjugate (A: #Matrix<_>) = A.Conjugate() |
|
|
|
|
|
let inline conjugateTranspose (A: #Matrix<_>) = A.ConjugateTranspose() |
|
|
|
|
|
let inline inverse (A: #Matrix<_>) = A.Inverse() |
|
|
|
|
|
|
|
|
|
|
|
let inline norm (A: #Matrix<_>) = A.L2Norm() |
|
|
|
|
|
let inline frobenius (A: #Matrix<_>) = A.FrobeniusNorm() |
|
|
|
|
|
let inline rank (A: #Matrix<_>) = A.Rank() |
|
|
|
|
|
let inline trace (A: #Matrix<_>) = A.Trace() |
|
|
|
|
|
let inline determinant (A: #Matrix<_>) = A.Determinant() |
|
|
|
|
|
let inline condition (A: #Matrix<_>) = A.ConditionNumber() |
|
|
|
|
|
let inline nullity (A: #Matrix<_>) = A.Nullity() |
|
|
|
|
|
let inline kernel (A: #Matrix<_>) = A.Kernel() |
|
|
|
|
|
let inline range (A: #Matrix<_>) = A.Range() |
|
|
|
|
|
let inline symmetric (A: #Matrix<_>) = A.IsSymmetric |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// A module which helps constructing generic dense matrices. |
|
|
/// A module which helps constructing generic dense matrices. |
|
|
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] |
|
|
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] |
|
|
|