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
e4cac031
Commit
e4cac031
authored
May 24, 2018
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.7.0
parent
1ff8f16d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
ChangeLog.md
ChangeLog.md
+2
-2
Structure.chs
src/IGraph/Algorithms/Structure.chs
+3
-1
Mutable.hs
src/IGraph/Mutable.hs
+1
-1
Basic.hs
tests/Test/Basic.hs
+13
-0
No files found.
ChangeLog.md
View file @
e4cac031
Revision history for haskell-igraph
===================================
v0.7.0 --
-----------
v0.7.0 --
2018-05-23
-----------
---------
*
Add more functions and tests.
*
Internal interface redesign.
...
...
src/IGraph/Algorithms/Structure.chs
View file @
e4cac031
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE DataKinds #-}
module IGraph.Algorithms.Structure
( -- * Shortest Path Related Functions
getShortestPath
...
...
@@ -75,7 +76,8 @@ isConnected gr = igraphIsConnected (_graph gr) IgraphWeak
isStronglyConnected :: Graph 'D v e -> Bool
isStronglyConnected gr = igraphIsConnected (_graph gr) IgraphStrong
{#fun igraph_is_connected as ^
{#fun pure igraph_is_connected as ^
{ `IGraph'
, alloca- `Bool' peekBool*
, `Connectedness'
...
...
src/IGraph/Mutable.hs
View file @
e4cac031
...
...
@@ -141,7 +141,7 @@ setEdgeAttr edgeId x gr = unsafePrimToPrim $
-- | Removes loop and/or multiple edges from the graph.
simplify :: Bool -- ^ If true, multiple edges will be removed.
-> Bool -- ^ If true, loops (self edges) will be removed.
->
->
([e] -> e) -- ^ Edge c
-> Graph d v e -> Graph d v e
simplify delMul delLoop fun gr = do
-}
tests/Test/Basic.hs
View file @
e4cac031
...
...
@@ -20,6 +20,7 @@ tests = testGroup "Basic tests"
[
graphCreation
,
graphCreationLabeled
,
graphEdit
,
nonSimpleGraphTest
]
graphCreation
::
TestTree
...
...
@@ -69,3 +70,15 @@ graphEdit = testGroup "Graph editing"
freeze
g
getEdges
gr
=
map
(
\
(
a
,
b
)
->
((
nodeLab
gr
a
,
nodeLab
gr
b
),
edgeLab
gr
(
a
,
b
)))
$
edges
gr
nonSimpleGraphTest
::
TestTree
nonSimpleGraphTest
=
testGroup
"loops, multiple edges"
[
testCase
"case 1"
$
es
@=?
labEdges
gr
]
where
es
=
[
((
0
,
1
),
'a'
)
,
((
1
,
2
),
'b'
)
,
((
1
,
2
),
'c'
)
,
((
0
,
2
),
'd'
)
]
gr
::
Graph
'U
Int
Char
gr
=
mkGraph
[
0
,
1
,
2
]
es
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