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
1
Issues
1
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
a3958109
Commit
a3958109
authored
Jun 11, 2015
by
Kai Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change function signature for cliques
parent
575555f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Clique.hs
src/IGraph/Clique.hs
+6
-6
No files found.
src/IGraph/Clique.hs
View file @
a3958109
...
@@ -10,20 +10,20 @@ import IGraph
...
@@ -10,20 +10,20 @@ import IGraph
import
IGraph.Internal.Clique
import
IGraph.Internal.Clique
import
IGraph.Internal.Data
import
IGraph.Internal.Data
cliques
::
(
Int
,
Int
)
-- ^ Minimum and maximum size of the cliques to be returned.
cliques
::
LGraph
d
v
e
->
(
Int
,
Int
)
-- ^ Minimum and maximum size of the cliques to be returned.
-- No bound will be used if negative or zero
-- No bound will be used if negative or zero
->
LGraph
d
v
e
->
[[
Int
]]
-- ^ cliques represented by node ids
->
[[
Int
]]
-- ^ cliques represented by node ids
cliques
(
lo
,
hi
)
gr
=
unsafePerformIO
$
do
cliques
gr
(
lo
,
hi
)
=
unsafePerformIO
$
do
vpptr
<-
igraphVectorPtrNew
0
vpptr
<-
igraphVectorPtrNew
0
_
<-
igraphCliques
(
_graph
gr
)
vpptr
lo
hi
_
<-
igraphCliques
(
_graph
gr
)
vpptr
lo
hi
(
map
.
map
)
truncate
<$>
vectorPPtrToList
vpptr
(
map
.
map
)
truncate
<$>
vectorPPtrToList
vpptr
maximalCliques
::
(
Int
,
Int
)
-- ^ Minimum and maximum size of the cliques to be returned.
maximalCliques
::
LGraph
d
v
e
->
(
Int
,
Int
)
-- ^ Minimum and maximum size of the cliques to be returned.
-- No bound will be used if negative or zero
-- No bound will be used if negative or zero
->
LGraph
d
v
e
->
[[
Int
]]
-- ^ cliques represented by node ids
->
[[
Int
]]
-- ^ cliques represented by node ids
maximalCliques
(
lo
,
hi
)
gr
=
unsafePerformIO
$
do
maximalCliques
gr
(
lo
,
hi
)
=
unsafePerformIO
$
do
vpptr
<-
igraphVectorPtrNew
0
vpptr
<-
igraphVectorPtrNew
0
_
<-
igraphMaximalCliques
(
_graph
gr
)
vpptr
lo
hi
_
<-
igraphMaximalCliques
(
_graph
gr
)
vpptr
lo
hi
(
map
.
map
)
truncate
<$>
vectorPPtrToList
vpptr
(
map
.
map
)
truncate
<$>
vectorPPtrToList
vpptr
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