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
46224148
Commit
46224148
authored
Sep 17, 2016
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade to Cabal 1.24
parent
32e9bb7b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
110 deletions
+8
-110
Selector.chs.c
cbits/Selector.chs.c
+0
-21
Structure.chs.c
cbits/Structure.chs.c
+0
-78
haskell-igraph.cabal
haskell-igraph.cabal
+3
-6
stack.yaml
stack.yaml
+1
-1
Basic.hs
tests/Test/Basic.hs
+3
-3
Structure.hs
tests/Test/Structure.hs
+1
-1
No files found.
cbits/Selector.chs.c
deleted
100644 → 0
View file @
32e9bb7b
#include "IGraph/Internal/Selector.chs.h"
igraph_vit_t
*
__c2hs_wrapped__igraph_vit_new
(
const
igraph_t
*
graph
,
igraph_vs_t
*
vs
)
{
return
igraph_vit_new
(
graph
,
*
vs
);
}
igraph_eit_t
*
__c2hs_wrapped__igraph_eit_new
(
const
igraph_t
*
graph
,
igraph_es_t
*
es
)
{
return
igraph_eit_new
(
graph
,
*
es
);
}
int
__c2hs_wrapped__igraph_delete_vertices
(
igraph_t
*
graph
,
const
igraph_vs_t
*
vertices
)
{
return
igraph_delete_vertices
(
graph
,
*
vertices
);
}
int
__c2hs_wrapped__igraph_delete_edges
(
igraph_t
*
graph
,
igraph_es_t
*
edges
)
{
return
igraph_delete_edges
(
graph
,
*
edges
);
}
cbits/Structure.chs.c
deleted
100644 → 0
View file @
32e9bb7b
#include "IGraph/Internal/Structure.chs.h"
int
__c2hs_wrapped__igraph_personalized_pagerank
(
const
igraph_t
*
graph
,
igraph_pagerank_algo_t
algo
,
igraph_vector_t
*
vector
,
igraph_real_t
*
value
,
const
igraph_vs_t
*
vids
,
igraph_bool_t
directed
,
igraph_real_t
damping
,
igraph_vector_t
*
reset
,
const
igraph_vector_t
*
weights
,
void
*
options
)
{
return
igraph_personalized_pagerank
(
graph
,
algo
,
vector
,
value
,
*
vids
,
directed
,
damping
,
reset
,
weights
,
options
);
}
int
__c2hs_wrapped__igraph_pagerank
(
const
igraph_t
*
graph
,
igraph_pagerank_algo_t
algo
,
igraph_vector_t
*
vector
,
igraph_real_t
*
value
,
const
igraph_vs_t
*
vids
,
igraph_bool_t
directed
,
igraph_real_t
damping
,
const
igraph_vector_t
*
weights
,
void
*
options
)
{
return
igraph_pagerank
(
graph
,
algo
,
vector
,
value
,
*
vids
,
directed
,
damping
,
weights
,
options
);
}
int
__c2hs_wrapped__igraph_induced_subgraph
(
const
igraph_t
*
graph
,
igraph_t
*
res
,
const
igraph_vs_t
*
vids
,
igraph_subgraph_implementation_t
impl
)
{
return
igraph_induced_subgraph
(
graph
,
res
,
*
vids
,
impl
);
}
int
__c2hs_wrapped__igraph_closeness
(
const
igraph_t
*
graph
,
igraph_vector_t
*
res
,
const
igraph_vs_t
*
vids
,
igraph_neimode_t
mode
,
const
igraph_vector_t
*
weights
,
igraph_bool_t
normalized
)
{
return
igraph_closeness
(
graph
,
res
,
*
vids
,
mode
,
weights
,
normalized
);
}
int
__c2hs_wrapped__igraph_betweenness
(
const
igraph_t
*
graph
,
igraph_vector_t
*
res
,
const
igraph_vs_t
*
vids
,
igraph_bool_t
directed
,
const
igraph_vector_t
*
weights
,
igraph_bool_t
nobigint
)
{
return
igraph_betweenness
(
graph
,
res
,
*
vids
,
directed
,
weights
,
nobigint
);
}
haskell-igraph.cabal
View file @
46224148
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
-- documentation, see http://haskell.org/cabal/users-guide/
name: haskell-igraph
name: haskell-igraph
version: 0.
1
.0
version: 0.
2
.0
synopsis: Imcomplete igraph bindings
synopsis: Imcomplete igraph bindings
description: This is an attempt to create a complete bindings for the
description: This is an attempt to create a complete bindings for the
igraph<"http://igraph.org/c/"> library. Related work:
igraph<"http://igraph.org/c/"> library. Related work:
...
@@ -11,11 +11,10 @@ license: MIT
...
@@ -11,11 +11,10 @@ license: MIT
license-file: LICENSE
license-file: LICENSE
author: Kai Zhang
author: Kai Zhang
maintainer: kai@kzhang.org
maintainer: kai@kzhang.org
copyright: (c) 201
5
Kai Zhang
copyright: (c) 201
6
Kai Zhang
category: Math
category: Math
build-type: Simple
build-type: Simple
extra-source-files: cbits/haskelligraph.c
cabal-version: >=1.24
cabal-version: >=1.22
Flag graphics
Flag graphics
Description: Enable graphics output
Description: Enable graphics output
...
@@ -72,8 +71,6 @@ library
...
@@ -72,8 +71,6 @@ library
build-tools: c2hs >=0.25.0
build-tools: c2hs >=0.25.0
C-Sources:
C-Sources:
cbits/haskelligraph.c
cbits/haskelligraph.c
cbits/Selector.chs.c
cbits/Structure.chs.c
test-suite tests
test-suite tests
type: exitcode-stdio-1.0
type: exitcode-stdio-1.0
...
...
stack.yaml
View file @
46224148
...
@@ -4,4 +4,4 @@ flags:
...
@@ -4,4 +4,4 @@ flags:
packages
:
packages
:
-
'
.'
-
'
.'
extra-deps
:
[]
extra-deps
:
[]
resolver
:
lts-
6.1
resolver
:
lts-
7.0
tests/Test/Basic.hs
View file @
46224148
...
@@ -28,14 +28,14 @@ graphCreation = testGroup "Graph creation"
...
@@ -28,14 +28,14 @@ graphCreation = testGroup "Graph creation"
]
]
where
where
edgeList
=
sort
$
unsafePerformIO
$
randEdges
1000
100
edgeList
=
sort
$
unsafePerformIO
$
randEdges
1000
100
gr
=
mkGraph
(
100
,
Nothing
)
(
edgeList
,
Nothing
)
::
LGraph
D
()
()
gr
=
mkGraph
(
replicate
100
()
)
$
zip
edgeList
$
repeat
(
)
::
LGraph
D
()
()
simple
=
mkGraph
(
3
,
Nothing
)
([(
0
,
1
),(
1
,
2
),(
2
,
0
)],
Nothing
)
::
LGraph
D
()
()
simple
=
mkGraph
(
replicate
3
()
)
$
zip
[(
0
,
1
),(
1
,
2
),(
2
,
0
)]
$
repeat
(
)
::
LGraph
D
()
()
graphEdit
::
TestTree
graphEdit
::
TestTree
graphEdit
=
testGroup
"Graph editing"
graphEdit
=
testGroup
"Graph editing"
[
testCase
""
$
[(
1
,
2
)]
@=?
(
sort
$
edges
simple'
)
]
[
testCase
""
$
[(
1
,
2
)]
@=?
(
sort
$
edges
simple'
)
]
where
where
simple
=
mkGraph
(
3
,
Nothing
)
([(
0
,
1
),(
1
,
2
),(
2
,
0
)],
Nothing
)
::
LGraph
U
()
()
simple
=
mkGraph
(
replicate
3
()
)
$
zip
[(
0
,
1
),(
1
,
2
),(
2
,
0
)]
$
repeat
(
)
::
LGraph
U
()
()
simple'
=
runST
$
do
simple'
=
runST
$
do
g
<-
thaw
simple
g
<-
thaw
simple
delEdges
[(
0
,
1
),(
0
,
2
)]
g
delEdges
[(
0
,
1
),(
0
,
2
)]
g
...
...
tests/Test/Structure.hs
View file @
46224148
...
@@ -27,7 +27,7 @@ subGraphs = testGroup "generate induced subgraphs"
...
@@ -27,7 +27,7 @@ subGraphs = testGroup "generate induced subgraphs"
,
[
"a"
,
"c"
],
[(
"a"
,
"c"
),
(
"c"
,
"a"
)]
)
,
[
"a"
,
"c"
],
[(
"a"
,
"c"
),
(
"c"
,
"a"
)]
)
test
(
ori
,
ns
,
expect
)
=
sort
expect
@=?
sort
result
test
(
ori
,
ns
,
expect
)
=
sort
expect
@=?
sort
result
where
where
gr
=
fromLabeledEdges
ori
::
LGraph
D
String
()
gr
=
fromLabeledEdges
$
zip
ori
$
repeat
()
::
LGraph
D
String
()
ns'
=
map
(
head
.
getNodes
gr
)
ns
ns'
=
map
(
head
.
getNodes
gr
)
ns
gr'
=
inducedSubgraph
gr
ns'
gr'
=
inducedSubgraph
gr
ns'
result
=
map
(
nodeLab
gr'
***
nodeLab
gr'
)
$
edges
gr'
result
=
map
(
nodeLab
gr'
***
nodeLab
gr'
)
$
edges
gr'
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