namespace MathNet.Numerics.Tests open NUnit.Framework open FsUnit open MathNet.Numerics.LinearAlgebra open MathNet.Numerics.LinearAlgebra.Double /// Unit tests for the sparse vector type. module SparseVectorTests = /// A small uniform vector. let smallv = new DenseVector( [|0.0;0.3;0.0;0.0;0.0|] ) :> Vector [] let ``SparseVector.ofListi`` () = SparseVector.ofListi 5 [ (1,0.3) ] |> should equal smallv [] let ``SparseVector.ofSeqi`` () = SparseVector.ofSeqi 5 (List.toSeq [ (1,0.3) ]) |> should equal smallv