Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-igraph
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
gargantext
haskell-igraph
Commits
22ca7495
Commit
22ca7495
authored
May 22, 2018
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
3908932e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
58 deletions
+2
-58
haskell-igraph.cabal
haskell-igraph.cabal
+1
-3
Generators.chs
src/IGraph/Algorithms/Generators.chs
+0
-2
Isomorphism.chs
src/IGraph/Algorithms/Isomorphism.chs
+0
-1
Layout.chs
src/IGraph/Algorithms/Layout.chs
+0
-1
Structure.chs
src/IGraph/Algorithms/Structure.chs
+1
-4
Read.hs
src/IGraph/Read.hs
+0
-47
No files found.
haskell-igraph.cabal
View file @
22ca7495
...
...
@@ -31,7 +31,6 @@ library
IGraph
IGraph.Mutable
IGraph.Types
IGraph.Read
IGraph.Exporter.GEXF
IGraph.Algorithms
IGraph.Algorithms.Structure
...
...
@@ -54,13 +53,12 @@ library
build-depends:
base >= 4.0 && < 5.0
, bytestring >= 0.9
, bytestring-lexing >= 0.5
, cereal
, colour
, conduit >= 1.3.0
, containers
, data-ordlist
, primitive
, containers
, hxt
, split
, singletons
...
...
src/IGraph/Algorithms/Generators.chs
View file @
22ca7495
...
...
@@ -11,7 +11,6 @@ module IGraph.Algorithms.Generators
, rewire
) where
import Control.Monad (when, forM_)
import Data.Serialize (Serialize)
import Data.Singletons (SingI, Sing, sing, fromSing)
import System.IO.Unsafe (unsafePerformIO)
...
...
@@ -22,7 +21,6 @@ import Foreign
import IGraph
import IGraph.Mutable (MGraph(..))
import qualified IGraph.Mutable as GM
{#import IGraph.Internal #}
{#import IGraph.Internal.Constants #}
{# import IGraph.Internal.Initialization #}
...
...
src/IGraph/Algorithms/Isomorphism.chs
View file @
22ca7495
...
...
@@ -16,7 +16,6 @@ import Foreign.C.Types
import IGraph
import IGraph.Internal.Initialization (igraphInit)
import IGraph.Mutable
{#import IGraph.Internal #}
#include "haskell_igraph.h"
...
...
src/IGraph/Algorithms/Layout.chs
View file @
22ca7495
...
...
@@ -9,7 +9,6 @@ module IGraph.Algorithms.Layout
import Data.Maybe (isJust)
import Foreign (nullPtr)
import qualified Foreign.Ptr as C2HSImp
import Foreign
import IGraph
...
...
src/IGraph/Algorithms/Structure.chs
View file @
22ca7495
...
...
@@ -11,9 +11,7 @@ module IGraph.Algorithms.Structure
) where
import Control.Monad
import Data.Either (fromRight)
import qualified Data.Map.Strict as M
import Data.Serialize (Serialize, decode)
import Data.Serialize (Serialize)
import Data.List (foldl')
import System.IO.Unsafe (unsafePerformIO)
import Data.Maybe
...
...
@@ -23,7 +21,6 @@ import Foreign
import Foreign.C.Types
import IGraph
import IGraph.Mutable (MGraph(..))
{#import IGraph.Internal #}
{#import IGraph.Internal.Constants #}
...
...
src/IGraph/Read.hs
deleted
100644 → 0
View file @
3908932e
module
IGraph.Read
(
readAdjMatrix
,
fromAdjMatrix
,
readAdjMatrixWeighted
)
where
import
qualified
Data.ByteString.Char8
as
B
import
Data.ByteString.Lex.Fractional
(
readExponential
,
readSigned
)
import
Data.Maybe
(
fromJust
)
import
Data.Singletons
(
SingI
)
import
IGraph
readDouble
::
B
.
ByteString
->
Double
readDouble
=
fst
.
fromJust
.
readSigned
readExponential
{-# INLINE readDouble #-}
readAdjMatrix
::
SingI
d
=>
FilePath
->
IO
(
Graph
d
B
.
ByteString
()
)
readAdjMatrix
=
fmap
fromAdjMatrix
.
B
.
readFile
fromAdjMatrix
::
SingI
d
=>
B
.
ByteString
->
Graph
d
B
.
ByteString
()
fromAdjMatrix
bs
=
let
(
header
:
xs
)
=
B
.
lines
bs
mat
=
map
(
map
readDouble
.
B
.
words
)
xs
es
=
fst
$
unzip
$
filter
f
$
zip
[
(
i
,
j
)
|
i
<-
[
0
..
nrow
-
1
],
j
<-
[
0
..
nrow
-
1
]
]
$
concat
mat
nrow
=
length
mat
ncol
=
length
$
head
mat
in
if
nrow
/=
ncol
then
error
"fromAdjMatrix: nrow != ncol"
else
mkGraph
(
B
.
words
header
)
$
zip
es
$
repeat
()
where
f
((
i
,
j
),
v
)
=
i
<
j
&&
v
/=
0
{-# INLINE fromAdjMatrix #-}
readAdjMatrixWeighted
::
SingI
d
=>
FilePath
->
IO
(
Graph
d
B
.
ByteString
Double
)
readAdjMatrixWeighted
fl
=
do
c
<-
B
.
readFile
fl
let
(
header
:
xs
)
=
B
.
lines
c
mat
=
map
(
map
readDouble
.
B
.
words
)
xs
(
es
,
ws
)
=
unzip
$
filter
f
$
zip
[
(
i
,
j
)
|
i
<-
[
0
..
nrow
-
1
],
j
<-
[
0
..
nrow
-
1
]
]
$
concat
mat
nrow
=
length
mat
ncol
=
length
$
head
mat
if
nrow
/=
ncol
then
error
"nrow != ncol"
else
return
$
mkGraph
(
B
.
words
header
)
$
zip
es
ws
where
f
((
i
,
j
),
v
)
=
i
<
j
&&
v
/=
0
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