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

v0.6.0

parent 70af5ab8
Revision history for haskell-igraph 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 * Breaking change: Drop `Graph` type class. Change `LGraph` and `MLGraph` to
`Graph` and `MGraph`. The new `Graph` and `MGraph` types are now dependently typed. `Graph` and `MGraph`. The new `Graph` and `MGraph` types are now dependently typed.
v0.5.0 -- 2018-04-25 v0.5.0 -- 2018-04-25
------------------- --------------------
* Fix memory leaks. * Fix memory leaks.
* Interface change: `mapNodes`, `mapEdges`, `filterNodes`, `filterEdges` become * Interface change: `mapNodes`, `mapEdges`, `filterNodes`, `filterEdges` become
...@@ -16,6 +16,6 @@ v0.5.0 -- 2018-04-25 ...@@ -16,6 +16,6 @@ v0.5.0 -- 2018-04-25
v0.4.0 -- 2018-04-20 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). * 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 ...@@ -58,7 +58,6 @@ library
, colour , colour
, conduit >= 1.3.0 , conduit >= 1.3.0
, data-ordlist , data-ordlist
, data-default-class
, primitive , primitive
, unordered-containers , unordered-containers
, hashable , hashable
......
...@@ -9,7 +9,6 @@ module IGraph.Community ...@@ -9,7 +9,6 @@ module IGraph.Community
, defaultSpinglass , defaultSpinglass
) where ) where
import Data.Default.Class
import Data.Function (on) import Data.Function (on)
import Data.List (sortBy, groupBy) import Data.List (sortBy, groupBy)
import Data.List.Ordered (nubSortBy) import Data.List.Ordered (nubSortBy)
......
...@@ -361,6 +361,9 @@ addIGraphFinalizer ptr = do ...@@ -361,6 +361,9 @@ addIGraphFinalizer ptr = do
return $ IGraph vec return $ IGraph vec
{-# INLINE addIGraphFinalizer #-} {-# 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' {#fun igraph_empty as igraphNew'
{ allocaIGraph- `IGraph' addIGraphFinalizer* { allocaIGraph- `IGraph' addIGraphFinalizer*
, `Int', `Bool' , `Int', `Bool'
...@@ -383,9 +386,15 @@ addIGraphFinalizer ptr = do ...@@ -383,9 +386,15 @@ addIGraphFinalizer ptr = do
-- to the second, etc. -- to the second, etc.
} -> `CInt' void- #} } -> `CInt' void- #}
-- | Create a igraph object and attach a finalizer {#fun igraph_to_directed as ^
igraphNew :: Int -> Bool -> HasInit -> IO IGraph { `IGraph' -- ^ The graph object to convert.
igraphNew n directed _ = igraphNew' n directed , `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 ...@@ -9,6 +9,9 @@ module IGraph.Internal.Constants where
{#enum igraph_edgeorder_type_t as EdgeOrderType {underscoreToCase} {#enum igraph_edgeorder_type_t as EdgeOrderType {underscoreToCase}
deriving (Show, Eq) #} deriving (Show, Eq) #}
{#enum igraph_to_directed_t as ToDirected {underscoreToCase}
deriving (Eq) #}
{#enum igraph_spincomm_update_t as SpincommUpdate {underscoreToCase} {#enum igraph_spincomm_update_t as SpincommUpdate {underscoreToCase}
deriving (Show, Eq) #} 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