Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
073613c4
Commit
073613c4
authored
Oct 26, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO] parameters name
parent
fde6d32d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Prelude.hs
src/Gargantext/Prelude.hs
+4
-1
Example.hs
src/Gargantext/Viz/Phylo/Example.hs
+2
-2
No files found.
src/Gargantext/Prelude.hs
View file @
073613c4
...
...
@@ -124,8 +124,11 @@ type Grain = Int
type
Step
=
Int
-- | Function to split a range into chunks
-- if step == grain then linearity
-- elif step < grain then overlapping
-- else dotted with holes
chunkAlong
::
Eq
a
=>
Grain
->
Step
->
[
a
]
->
[[
a
]]
chunkAlong
a
b
l
=
case
a
>
0
&&
b
>
0
&&
a
>=
b
of
chunkAlong
a
b
l
=
case
a
>
0
&&
b
>
0
of
True
->
chunkAlong_
a
b
l
False
->
panic
"ChunkAlong: Parameters should be > 0 and Grain > Step"
...
...
src/Gargantext/Viz/Phylo/Example.hs
View file @
073613c4
...
...
@@ -59,9 +59,9 @@ phyloTerms = toPeriodes date 5 3 $ cleanHistory mapList phyloCorpus
toPeriodes
::
(
Ord
date
,
Enum
date
)
=>
(
event
->
date
)
->
Grain
->
Step
->
[
event
]
->
Map
(
date
,
date
)
[
event
]
toPeriodes
_
_
_
[]
=
panic
"Empty history can not have any periods"
toPeriodes
f
s
o
as
=
DM
.
fromList
$
zip
hs
$
map
(
inPeriode
f
a
s
)
hs
toPeriodes
f
g
s
es
=
DM
.
fromList
$
zip
hs
$
map
(
inPeriode
f
e
s
)
hs
where
hs
=
steps
s
o
$
both
f
(
DL
.
head
as
,
DL
.
last
a
s
)
hs
=
steps
g
s
$
both
f
(
DL
.
head
es
,
DL
.
last
e
s
)
inPeriode
::
Ord
b
=>
(
t
->
b
)
->
[
t
]
->
(
b
,
b
)
->
[
t
]
inPeriode
f
h
(
start
,
end
)
=
...
...
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