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
055a3114
Commit
055a3114
authored
Apr 25, 2018
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.5.0
parent
e3f55c20
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
16 deletions
+12
-16
ChangeLog.md
ChangeLog.md
+3
-1
haskell-igraph.cabal
haskell-igraph.cabal
+1
-1
Mutable.hs
src/IGraph/Mutable.hs
+0
-8
Structure.chs
src/IGraph/Structure.chs
+2
-6
Types.hs
src/IGraph/Types.hs
+6
-0
No files found.
ChangeLog.md
View file @
055a3114
Revision history for haskell-igraph
===================================
v0.
4.* --
v0.
5.0 -- 2018-04-25
-------------------
*
Fix memory leaks.
*
Interface change:
`mapNodes`
,
`mapEdges`
,
`filterNodes`
,
`filterEdges`
become
`nmap`
,
`emap`
,
`nfilter`
,
`efilter`
.
v0.4.0 -- 2018-04-20
...
...
haskell-igraph.cabal
View file @
055a3114
name: haskell-igraph
version: 0.
4
.0
version: 0.
5
.0
synopsis: Haskell interface of the igraph library.
description: igraph<"http://igraph.org/c/"> is a library for creating
and manipulating large graphs. This package provides the Haskell
...
...
src/IGraph/Mutable.hs
View file @
055a3114
...
...
@@ -4,8 +4,6 @@ module IGraph.Mutable
,
MLGraph
(
..
)
,
setEdgeAttr
,
setNodeAttr
,
edgeAttr
,
vertexAttr
)
where
import
Control.Monad
(
when
,
forM
)
...
...
@@ -17,12 +15,6 @@ import IGraph.Internal
import
IGraph.Internal.Initialization
import
IGraph.Types
vertexAttr
::
String
vertexAttr
=
"vertex_attribute"
edgeAttr
::
String
edgeAttr
=
"edge_attribute"
-- | Mutable labeled graph.
newtype
MLGraph
m
d
v
e
=
MLGraph
IGraph
...
...
src/IGraph/Structure.chs
View file @
055a3114
...
...
@@ -29,12 +29,8 @@ inducedSubgraph :: (Hashable v, Eq v, Serialize v) => LGraph d v e -> [Int] -> L
inducedSubgraph gr vs = unsafePerformIO $ do
vs' <- fromList $ map fromIntegral vs
vsptr <- igraphVsVector vs'
g' <- igraphInducedSubgraph (_graph gr) vsptr IgraphSubgraphCreateFromScratch
nV <- igraphVcount g'
labels <- forM [0 .. nV - 1] $ \i ->
igraphHaskellAttributeVAS g' vertexAttr i >>= bsToByteString >>=
return . fromRight (error "decode failed") . decode
return $ LGraph g' $ M.fromListWith (++) $ zip labels $ map return [0..nV-1]
igraphInducedSubgraph (_graph gr) vsptr IgraphSubgraphCreateFromScratch >>=
unsafeFreeze . MLGraph
-- | Closeness centrality
closeness :: [Int] -- ^ vertices
...
...
src/IGraph/Types.hs
View file @
055a3114
...
...
@@ -12,3 +12,9 @@ data U
-- | Directed graph.
data
D
vertexAttr
::
String
vertexAttr
=
"vertex_attribute"
edgeAttr
::
String
edgeAttr
=
"edge_attribute"
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