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
670c670d
Commit
670c670d
authored
Sep 22, 2016
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cbits
parent
72e01fe8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
33 deletions
+45
-33
haskelligraph.c
cbits/haskelligraph.c
+36
-0
haskell-igraph.cabal
haskell-igraph.cabal
+1
-0
haskelligraph.h
include/haskelligraph.h
+5
-30
Clique.chs
src/IGraph/Internal/Clique.chs
+1
-1
Community.chs
src/IGraph/Internal/Community.chs
+1
-1
Constants.chs
src/IGraph/Internal/Constants.chs
+1
-1
No files found.
cbits/haskelligraph.c
0 → 100644
View file @
670c670d
#include <igraph/igraph.h>
igraph_integer_t
igraph_get_eid_
(
igraph_t
*
graph
,
igraph_integer_t
pfrom
,
igraph_integer_t
pto
,
igraph_bool_t
directed
,
igraph_bool_t
error
)
{
igraph_integer_t
eid
;
igraph_get_eid
(
graph
,
&
eid
,
pfrom
,
pto
,
directed
,
error
);
return
eid
;
}
char
**
igraph_strvector_get_
(
igraph_strvector_t
*
s
,
long
int
i
)
{
char
**
x
=
(
char
**
)
malloc
(
sizeof
(
char
*
));
igraph_strvector_get
(
s
,
i
,
x
);
return
x
;
}
igraph_arpack_options_t
*
igraph_arpack_new
()
{
igraph_arpack_options_t
*
arpack
=
(
igraph_arpack_options_t
*
)
malloc
(
sizeof
(
igraph_arpack_options_t
));
igraph_arpack_options_init
(
arpack
);
return
arpack
;
}
void
igraph_arpack_destroy
(
igraph_arpack_options_t
*
arpack
)
{
if
(
arpack
)
free
(
arpack
);
arpack
=
NULL
;
}
void
haskelligraph_init
()
{
/* attach attribute table */
igraph_i_set_attribute_table
(
&
igraph_cattribute_table
);
}
haskell-igraph.cabal
View file @
670c670d
...
...
@@ -69,6 +69,7 @@ library
hs-source-dirs: src
default-language: Haskell2010
build-tools: c2hs >=0.25.0
c-sources: cbits/haskelligraph.c
include-dirs: include
test-suite tests
...
...
include/haskelligraph.h
View file @
670c670d
...
...
@@ -4,39 +4,14 @@
#include <igraph/igraph.h>
igraph_integer_t
igraph_get_eid_
(
igraph_t
*
graph
,
igraph_integer_t
pfrom
,
igraph_integer_t
pto
,
igraph_bool_t
directed
,
igraph_bool_t
error
)
{
igraph_integer_t
eid
;
igraph_get_eid
(
graph
,
&
eid
,
pfrom
,
pto
,
directed
,
error
);
return
eid
;
}
igraph_bool_t
directed
,
igraph_bool_t
error
);
char
**
igraph_strvector_get_
(
igraph_strvector_t
*
s
,
long
int
i
)
{
char
**
x
=
(
char
**
)
malloc
(
sizeof
(
char
*
));
igraph_strvector_get
(
s
,
i
,
x
);
return
x
;
}
char
**
igraph_strvector_get_
(
igraph_strvector_t
*
s
,
long
int
i
);
igraph_arpack_options_t
*
igraph_arpack_new
()
{
igraph_arpack_options_t
*
arpack
=
(
igraph_arpack_options_t
*
)
malloc
(
sizeof
(
igraph_arpack_options_t
));
igraph_arpack_options_init
(
arpack
);
return
arpack
;
}
igraph_arpack_options_t
*
igraph_arpack_new
();
void
igraph_arpack_destroy
(
igraph_arpack_options_t
*
arpack
)
{
if
(
arpack
)
free
(
arpack
);
arpack
=
NULL
;
}
void
haskelligraph_init
()
{
/* attach attribute table */
igraph_i_set_attribute_table
(
&
igraph_cattribute_table
);
}
void
igraph_arpack_destroy
(
igraph_arpack_options_t
*
arpack
);
void
haskelligraph_init
();
#endif
src/IGraph/Internal/Clique.chs
View file @
670c670d
...
...
@@ -10,7 +10,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Graph #}
{#import IGraph.Internal.Data #}
#include "
haskell
igraph.h"
#include "
igraph/
igraph.h"
{#fun igraph_cliques as ^ { `IGraphPtr', `VectorPPtr', `Int', `Int' } -> `Int' #}
...
...
src/IGraph/Internal/Community.chs
View file @
670c670d
...
...
@@ -9,7 +9,7 @@ import Foreign.C.Types
{#import IGraph.Internal.Data #}
{#import IGraph.Internal.Constants #}
#include "
haskell
igraph.h"
#include "
igraph/
igraph.h"
{#fun igraph_community_spinglass as ^
{ `IGraphPtr'
...
...
src/IGraph/Internal/Constants.chs
View file @
670c670d
...
...
@@ -3,7 +3,7 @@ module IGraph.Internal.Constants where
import Foreign
#include "
haskell
igraph.h"
#include "
igraph/
igraph.h"
{#enum igraph_neimode_t as Neimode {underscoreToCase}
deriving (Show, Eq) #}
...
...
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