Skip to content

Commit

Permalink
fixed #42
Browse files Browse the repository at this point in the history
  • Loading branch information
ocramz committed Apr 27, 2018
1 parent 67cef26 commit f9453f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/LibSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ main = hspec spec

spec :: Spec
spec = do
describe "Data.Sparse.Commond" $ do
it "fromRowsL assembles a SpMatrix from a list of SpVector rows" $
fromRowsL [x42, y42] `shouldBe` m42
it "fromColsL assembles a SpMatrix from a list of SpVector columns" $
fromColsL [x42, y42] `shouldBe` transposeSM m42
describe "Numeric.LinearAlgebra.Sparse : Library" $ do
prop "Subtraction is cancellative" $ \(x :: SpVector Double) ->
norm2Sq (x ^-^ x) `shouldBe` zeroV
Expand Down Expand Up @@ -1168,3 +1173,5 @@ x42, y42 :: SpVector Double
x42 = fromListSV 4 [(2,3)]
y42 = fromListSV 4 [(0,3)]

m42 :: SpMatrix Double
m42 = fromListSM (2, 4) [(1,0,3), (0,2,3)]

0 comments on commit f9453f0

Please sign in to comment.