Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
6a4d5504
Unverified
Commit
6a4d5504
authored
Jun 06, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diag: no need for type annotation
parent
5cedf5b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Matrice.hs
src/Gargantext/Viz/Graph/Distances/Matrice.hs
+6
-7
No files found.
src/Gargantext/Viz/Graph/Distances/Matrice.hs
View file @
6a4d5504
...
...
@@ -30,7 +30,6 @@ Implementation use Accelerate library :
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
...
...
@@ -87,8 +86,8 @@ mkSum r mat = replicate (constant (Z :. (r :: Int) :. All)) $ sum mat
divByDiag
::
Rank
->
Acc
(
Matrix
Double
)
->
Acc
(
Matrix
Double
)
divByDiag
r
mat
=
zipWith
(
/
)
mat
(
replicate
(
constant
(
Z
:.
(
r
::
Int
)
:.
All
))
$
diag
mat
)
diag
::
forall
e
.
Elt
e
=>
Acc
(
Matrix
e
)
->
Acc
(
Vector
e
)
diag
m
=
backpermute
(
indexTail
(
shape
m
))
(
lift1
(
\
(
Z
:.
x
)
->
(
Z
:.
x
:.
(
x
::
Exp
Int
))))
(
m
::
Acc
(
Array
DIM2
e
))
diag
::
Elt
e
=>
Acc
(
Matrix
e
)
->
Acc
(
Vector
e
)
diag
m
=
backpermute
(
indexTail
(
shape
m
))
(
lift1
(
\
(
Z
:.
x
)
->
(
Z
:.
x
:.
(
x
::
Exp
Int
))))
m
type
Matrix'
a
=
Acc
(
Matrix
a
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment