Commit 43fe729b authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX+DOC] haddock + warnings

parent d5c72ed2
...@@ -32,8 +32,8 @@ data ExternalAPIs = All ...@@ -32,8 +32,8 @@ data ExternalAPIs = All
| HAL | HAL
| IsTex | IsTex
| Isidore | Isidore
-- | IsidoreAuth
deriving (Show, Eq, Enum, Bounded, Generic) deriving (Show, Eq, Enum, Bounded, Generic)
-- | IsidoreAuth
-- | Main Instances -- | Main Instances
......
...@@ -245,15 +245,16 @@ distributional m = run -- $ matMiniMax ...@@ -245,15 +245,16 @@ distributional m = run -- $ matMiniMax
where where
-- filter m = zipWith (\a b -> max a b) m (transpose m) -- filter m = zipWith (\a b -> max a b) m (transpose m)
{-
ri :: Acc (Matrix Double) -> Acc (Matrix Double) ri :: Acc (Matrix Double) -> Acc (Matrix Double)
ri mat = mat1 -- zipWith (/) mat1 mat2 ri mat = mat1 -- zipWith (/) mat1 mat2
where where
mat1 = matSumCol n $ zipWith min' (myMin mat) (myMin $ transpose mat) mat1 = matSumCol n $ zipWith min' (myMin mat) (myMin $ transpose mat)
mat2 = total mat mat2 = total mat
myMin :: Acc (Matrix Double) -> Acc (Matrix Double) myMin :: Acc (Matrix Double) -> Acc (Matrix Double)
myMin = replicate (constant (Z :. n :. All)) . minimum myMin = replicate (constant (Z :. n :. All)) . minimum
-}
-- TODO fix NaN -- TODO fix NaN
-- Quali TEST: OK -- Quali TEST: OK
...@@ -279,7 +280,7 @@ identityMatrix n = ...@@ -279,7 +280,7 @@ identityMatrix n =
eyeMatrix :: Num a => Dim -> Acc (Matrix a) -> Acc (Matrix a) eyeMatrix :: Num a => Dim -> Acc (Matrix a) -> Acc (Matrix a)
eyeMatrix n' m = eyeMatrix n' _m =
let ones = fill (index2 n n) 1 let ones = fill (index2 n n) 1
zeros = fill (index1 n) 0 zeros = fill (index1 n) 0
n = constant n' n = constant n'
...@@ -288,18 +289,18 @@ eyeMatrix n' m = ...@@ -288,18 +289,18 @@ eyeMatrix n' m =
selfMatrix :: Num a => Dim -> Acc (Matrix a) -> Acc (Matrix a) selfMatrix :: Num a => Dim -> Acc (Matrix a) -> Acc (Matrix a)
selfMatrix n' m = selfMatrix n' _m =
let zeros = fill (index2 n n) 0 let zeros = fill (index2 n n) 0
ones = fill (index2 n n) 1 ones = fill (index2 n n) 1
n = constant n' n = constant n'
in in
permute const ones ( lift1 ( \(Z :. (i :: Exp Int) :. (j:: Exp Int)) permute const ones ( lift1 ( \(Z :. (i :: Exp Int) :. (_j:: Exp Int))
-> -- ifThenElse (i /= j) -> -- ifThenElse (i /= j)
-- (Z :. i :. j) -- (Z :. i :. j)
(Z :. i :. i) (Z :. i :. i)
)) zeros )) zeros
selfMatrix' :: (Elt a, P.Num (Exp a)) => Array DIM2 a -> Matrix a
selfMatrix' m' = run $ selfMatrix n m selfMatrix' m' = run $ selfMatrix n m
where where
n = dim m' n = dim m'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment