Commit 9c675c39 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Fix bridges function

parent d7911244
......@@ -220,13 +220,13 @@ articulationPoints gr = unsafePerformIO $ allocaVector $ \res -> do
-- ^ Find all bridges in a graph.
bridges :: Graph d v e -> [Edge]
bridges gr = unsafePerformIO $ allocaVector $ \res -> do
bridges gr = unsafePerformIO $ allocaVectorInt $ \res -> do
igraphBridges (_graph gr) res
map (getEdgeByEid gr) <$> toNodes res
map (getEdgeByEid gr) <$> toIntList res
{-# INLINE igraphBridges #-}
{#fun igraph_bridges as ^
{ `IGraph'
, castPtr `Ptr Vector'
, castPtr `Ptr VectorInt'
} -> `CInt' void- #}
-- | Checks whether a graph is a directed acyclic graph (DAG) or not.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment