Commit 5a0af3fd authored by Kai Zhang's avatar Kai Zhang

v0.6.0

parent 70af5ab8
Revision history for haskell-igraph
===================================
v0.6.0 --
-------------------
v0.6.0 -- 2018-05-10
--------------------
* Breaking change: Drop `Graph` type class. Change `LGraph` and `MLGraph` to
`Graph` and `MGraph`. The new `Graph` and `MGraph` types are now dependently typed.
v0.5.0 -- 2018-04-25
-------------------
--------------------
* Fix memory leaks.
* Interface change: `mapNodes`, `mapEdges`, `filterNodes`, `filterEdges` become
......@@ -16,6 +16,6 @@ v0.5.0 -- 2018-04-25
v0.4.0 -- 2018-04-20
-------------------
--------------------
* A new attribute interface written in C. The graph attributes are now directly serialized into bytestring using "cereal" (before we used the `Show` instance).
......@@ -58,7 +58,6 @@ library
, colour
, conduit >= 1.3.0
, data-ordlist
, data-default-class
, primitive
, unordered-containers
, hashable
......
......@@ -9,7 +9,6 @@ module IGraph.Community
, defaultSpinglass
) where
import Data.Default.Class
import Data.Function (on)
import Data.List (sortBy, groupBy)
import Data.List.Ordered (nubSortBy)
......
......@@ -361,6 +361,9 @@ addIGraphFinalizer ptr = do
return $ IGraph vec
{-# INLINE addIGraphFinalizer #-}
-- | Create a igraph object and attach a finalizer
igraphNew :: Int -> Bool -> HasInit -> IO IGraph
igraphNew n directed _ = igraphNew' n directed
{#fun igraph_empty as igraphNew'
{ allocaIGraph- `IGraph' addIGraphFinalizer*
, `Int', `Bool'
......@@ -383,9 +386,15 @@ addIGraphFinalizer ptr = do
-- to the second, etc.
} -> `CInt' void- #}
-- | Create a igraph object and attach a finalizer
igraphNew :: Int -> Bool -> HasInit -> IO IGraph
igraphNew n directed _ = igraphNew' n directed
{#fun igraph_to_directed as ^
{ `IGraph' -- ^ The graph object to convert.
, `ToDirected' -- ^ Specifies the details of how exactly the conversion is
-- done. Possible values: IGRAPH_TO_DIRECTED_ARBITRARY:
-- the number of edges in the graph stays the same,
-- an arbitrarily directed edge is created for each
-- undirected edge; IGRAPH_TO_DIRECTED_MUTUAL: two directed
-- edges are created for each undirected edge, one in each direction.
} -> `CInt' void- #}
--------------------------------------------------------------------------------
......
......@@ -9,6 +9,9 @@ module IGraph.Internal.Constants where
{#enum igraph_edgeorder_type_t as EdgeOrderType {underscoreToCase}
deriving (Show, Eq) #}
{#enum igraph_to_directed_t as ToDirected {underscoreToCase}
deriving (Eq) #}
{#enum igraph_spincomm_update_t as SpincommUpdate {underscoreToCase}
deriving (Show, Eq) #}
......
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