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
6
Merge Requests
6
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
6ee8ef52
Commit
6ee8ef52
authored
7 years ago
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO/FIX] time format.
parent
b454d924
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Phylo.hs
src/Gargantext/Types/Phylo.hs
+8
-7
No files found.
src/Gargantext/Types/Phylo.hs
View file @
6ee8ef52
...
...
@@ -26,7 +26,7 @@ module Gargantext.Types.Phylo where
import
Data.Aeson.TH
(
deriveJSON
)
import
Data.Maybe
(
Maybe
)
import
Data.Text
(
Text
)
import
Data.Time
(
UTC
Time
)
import
Data.Time
.Clock.POSIX
(
POSIX
Time
)
import
GHC.Generics
(
Generic
)
...
...
@@ -40,11 +40,12 @@ import Gargantext.Utils.Prefix (unPrefix)
-- Steps : list of all steps to build the phylomemy
data
Phylo
=
Phylo
{
_phyloDuration
::
(
Start
,
End
)
,
_phyloNgrams
::
[
Ngram
]
,
_phyloPeriods
::
[
PhyloPeriod
]
,
_phyloPeriods
::
[
PhyloPeriod
]
}
deriving
(
Generic
)
type
Start
=
UTCTime
-- TODO: format EPOCH unix integer
type
End
=
UTCTime
-- TODO: format EPOCH unix integer
-- | UTCTime in seconds since UNIX epoch
type
Start
=
POSIXTime
type
End
=
POSIXTime
type
Ngram
=
(
NgramId
,
Text
)
type
NgramId
=
Int
...
...
@@ -64,7 +65,7 @@ type PhyloPeriodId = (Start, End)
-- Level 0: Group of synonyms (by stems + by qualitative expert meaning)
-- Level 1: First level of clustering
-- Level N: Nth level of clustering
data
PhyloLevel
=
PhyloLevel
{
_phyloLevelId
::
PhyloLevelId
data
PhyloLevel
=
PhyloLevel
{
_phyloLevelId
::
PhyloLevelId
,
_phyloLevelGroups
::
[
PhyloGroup
]
}
deriving
(
Generic
)
...
...
@@ -86,8 +87,8 @@ data PhyloGroup = PhyloGroup { _phyloGroupId :: PhyloGroupId
,
_phyloGroupLevelChilds
::
[
Edge
]
}
deriving
(
Generic
)
type
PhyloGroupId
=
(
Phylo
PeriodId
,
Phylo
LevelId
,
Int
)
type
Edge
=
(
PhyloGroupId
,
Weight
)
type
PhyloGroupId
=
(
PhyloLevelId
,
Int
)
type
Edge
=
(
PhyloGroupId
,
Weight
)
type
Weight
=
Double
-- | JSON instances
...
...
This diff is collapsed.
Click to expand it.
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