Currently, Data.Sparse.Common is the interface to sparse datastructures. It gathers SpMatrix, SpVector and IntMap2 functionality, and re-exports all of it.
If we comment out as X in the line import Data.Sparse.IntMap2.IntMap2 as X , thus omitting its re-export, a number of algorithms can't find the implementation:
src/Numeric/LinearAlgebra/Sparse.hs:410:13: error: …
• Variable not in scope:
lookupIM2 :: IxRow -> IxCol -> IM.IntMap (IM.IntMap a) -> Maybe a1
• Perhaps you meant ‘lookupSM’ (imported from Data.Sparse.Common)
src/Numeric/LinearAlgebra/Sparse.hs:412:20: error: …
• Variable not in scope:
ifilterIM2
:: (IxRow -> IxCol -> t0 -> Bool)
-> IM.IntMap (IM.IntMap a) -> IM.IntMap a0
• Perhaps you meant one of these:
‘ifilterSM’ (imported from Data.Sparse.Common),
‘ifilterSV’ (imported from Data.Sparse.Common),
‘filterSM’ (imported from Data.Sparse.Common)
src/Numeric/LinearAlgebra/Sparse.hs:436:25: error: …
• Couldn't match expected type ‘(Rows, Cols)’
with actual type ‘FDSize f’
• In the first argument of ‘SM’, namely ‘(dim m)’
In the expression: SM (dim m)
In the expression: SM (dim m) $ ifilterIM2 f (dat m)
• Relevant bindings include
m :: f a4
(bound at /Users/ocramz/Dropbox/RESEARCH/Haskell/sparse-linear-algebra/src/Numeric/LinearAlgebra/Sparse.hs:436:14)
sparsifyLU :: f a4 -> SpMatrix a2 -> SpMatrix a3
(bound at /Users/ocramz/Dropbox/RESEARCH/Haskell/sparse-linear-algebra/src/Numeric/LinearAlgebra/Sparse.hs:436:3)
src/Numeric/LinearAlgebra/Sparse.hs:436:34: error: …
• Variable not in scope:
ifilterIM2
:: (IxRow -> IxCol -> t1 -> Bool)
-> HDData f a4 -> IM.IntMap (IM.IntMap a3)
• Perhaps you meant one of these:
‘ifilterSM’ (imported from Data.Sparse.Common),
‘ifilterSV’ (imported from Data.Sparse.Common),
‘filterSM’ (imported from Data.Sparse.Common)
Compilation failed.
This is wrong, because it pins the algorithm implementation to the datastructure used. We need a typeclass interface
Currently,
Data.Sparse.Common
is the interface to sparse datastructures. It gathers SpMatrix, SpVector and IntMap2 functionality, and re-exports all of it. If we comment outas X
in the lineimport Data.Sparse.IntMap2.IntMap2 as X
, thus omitting its re-export, a number of algorithms can't find the implementation:This is wrong, because it pins the algorithm implementation to the datastructure used. We need a typeclass interface