Browse Source

LA: F# vector/matrix functions to accept all #seq instead of lists only

build
Christoph Ruegg 10 years ago
parent
commit
78dfc618ed
  1. 4
      src/FSharp/LinearAlgebra.Matrix.fs
  2. 4
      src/FSharp/LinearAlgebra.Vector.fs

4
src/FSharp/LinearAlgebra.Matrix.fs

@ -657,8 +657,8 @@ module DiagonalMatrix =
[<AutoOpen>]
module MatrixExtensions =
/// Construct a dense matrix from a nested list of numbers.
let inline matrix (lst: list<list<'T>>) = DenseMatrix.ofRowList lst
/// Construct a dense matrix from a nested sequence of numbers.
let inline matrix (rowsSequences: #seq<#seq<'T>>) = DenseMatrix.ofRowSeq rowsSequences
// A type extension for the generic matrix type that
// adds the 'GetSlice' method to allow m.[r1 .. r2, c1 .. c2] syntax

4
src/FSharp/LinearAlgebra.Vector.fs

@ -328,8 +328,8 @@ module SparseVector =
[<AutoOpen>]
module VectorExtensions =
/// Construct a dense vector from a list of floating point numbers.
let inline vector (lst: list<'T>) = DenseVector.ofList lst
/// Construct a dense vector from a sequence of floating point numbers.
let inline vector (sequence: #seq<'T>) = DenseVector.ofSeq sequence
// A type extension for the generic vector type that
// adds the 'GetSlice' method to allow vec.[a .. b] syntax

Loading…
Cancel
Save