packages feed

Graphalyze 0.10.0.1 → 0.11.0.0

raw patch · 3 files changed

+16/−15 lines, 3 filesdep ~graphvizPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: graphviz

API changes (from Hackage documentation)

- Data.Graph.Analysis.Algorithms.Clustering: instance (Eq a) => Metric (PosLabel a)
- Data.Graph.Analysis.Types: instance (Eq a) => Eq (GenCluster a)
- Data.Graph.Analysis.Types: instance (Eq a) => Eq (PosLabel a)
- Data.Graph.Analysis.Types: instance (Show a) => Show (GenCluster a)
- Data.Graph.Analysis.Types: instance (Show a) => Show (PosLabel a)
+ Data.Graph.Analysis.Algorithms.Clustering: instance Eq a => Metric (PosLabel a)
+ Data.Graph.Analysis.Types: instance Eq a => Eq (GenCluster a)
+ Data.Graph.Analysis.Types: instance Eq a => Eq (PosLabel a)
+ Data.Graph.Analysis.Types: instance Show a => Show (GenCluster a)
+ Data.Graph.Analysis.Types: instance Show a => Show (PosLabel a)
- Data.Graph.Analysis: collapseAndUpdate :: (Ord n) => [AGr n e -> [(NGroup, n)]] -> GraphData n e -> GraphData n e
+ Data.Graph.Analysis: collapseAndUpdate :: Ord n => [AGr n e -> [(NGroup, n)]] -> GraphData n e -> GraphData n e
- Data.Graph.Analysis: collapseAndUpdate' :: (Ord n) => [AGr n e -> [(NGroup, n)]] -> GraphData n e -> (GraphData n e, Map n n)
+ Data.Graph.Analysis: collapseAndUpdate' :: Ord n => [AGr n e -> [(NGroup, n)]] -> GraphData n e -> (GraphData n e, Map n n)
- Data.Graph.Analysis: levelGraphFromRoot :: (Ord n) => GraphData n e -> GraphData (GenCluster n) e
+ Data.Graph.Analysis: levelGraphFromRoot :: Ord n => GraphData n e -> GraphData (GenCluster n) e
- Data.Graph.Analysis.Algorithms.Clustering: collapseAndReplace :: (DynGraph gr) => [gr a b -> [(NGroup, a)]] -> gr a b -> gr a b
+ Data.Graph.Analysis.Algorithms.Clustering: collapseAndReplace :: DynGraph gr => [gr a b -> [(NGroup, a)]] -> gr a b -> gr a b
- Data.Graph.Analysis.Algorithms.Clustering: collapseAndReplace' :: (DynGraph gr) => [gr a b -> [(NGroup, a)]] -> gr a b -> (gr a b, [(NGroup, a)])
+ Data.Graph.Analysis.Algorithms.Clustering: collapseAndReplace' :: DynGraph gr => [gr a b -> [(NGroup, a)]] -> gr a b -> (gr a b, [(NGroup, a)])
- Data.Graph.Analysis.Algorithms.Clustering: collapseGraphBy :: (DynGraph gr) => [gr (CNodes a) b -> [NGroup]] -> gr a b -> gr (CNodes a) b
+ Data.Graph.Analysis.Algorithms.Clustering: collapseGraphBy :: DynGraph gr => [gr (CNodes a) b -> [NGroup]] -> gr a b -> gr (CNodes a) b
- Data.Graph.Analysis.Algorithms.Clustering: trivialCollapse :: (Graph gr) => gr (CNodes a) b -> Bool
+ Data.Graph.Analysis.Algorithms.Clustering: trivialCollapse :: Graph gr => gr (CNodes a) b -> Bool
- Data.Graph.Analysis.Algorithms.Common: cliquesIn :: (DynGraph g) => g a b -> [[LNode a]]
+ Data.Graph.Analysis.Algorithms.Common: cliquesIn :: DynGraph g => g a b -> [[LNode a]]
- Data.Graph.Analysis.Algorithms.Common: cliquesIn' :: (DynGraph g) => g a b -> [NGroup]
+ Data.Graph.Analysis.Algorithms.Common: cliquesIn' :: DynGraph g => g a b -> [NGroup]
- Data.Graph.Analysis.Algorithms.Common: componentsOf :: (DynGraph g) => g a b -> [g a b]
+ Data.Graph.Analysis.Algorithms.Common: componentsOf :: DynGraph g => g a b -> [g a b]
- Data.Graph.Analysis.Algorithms.Common: cyclesIn :: (DynGraph g) => g a b -> [LNGroup a]
+ Data.Graph.Analysis.Algorithms.Common: cyclesIn :: DynGraph g => g a b -> [LNGroup a]
- Data.Graph.Analysis.Algorithms.Common: cyclesIn' :: (DynGraph g) => g a b -> [NGroup]
+ Data.Graph.Analysis.Algorithms.Common: cyclesIn' :: DynGraph g => g a b -> [NGroup]
- Data.Graph.Analysis.Algorithms.Common: findRegular :: (Graph g) => g a b -> [[Node]]
+ Data.Graph.Analysis.Algorithms.Common: findRegular :: Graph g => g a b -> [[Node]]
- Data.Graph.Analysis.Algorithms.Common: isRegular :: (Graph g) => g a b -> NGroup -> Bool
+ Data.Graph.Analysis.Algorithms.Common: isRegular :: Graph g => g a b -> NGroup -> Bool
- Data.Graph.Analysis.Algorithms.Common: pathTree :: (DynGraph g) => Decomp g a b -> [NGroup]
+ Data.Graph.Analysis.Algorithms.Common: pathTree :: DynGraph g => Decomp g a b -> [NGroup]
- Data.Graph.Analysis.Algorithms.Common: uniqueCycles :: (DynGraph g) => g a b -> [LNGroup a]
+ Data.Graph.Analysis.Algorithms.Common: uniqueCycles :: DynGraph g => g a b -> [LNGroup a]
- Data.Graph.Analysis.Algorithms.Common: uniqueCycles' :: (DynGraph g) => g a b -> [NGroup]
+ Data.Graph.Analysis.Algorithms.Common: uniqueCycles' :: DynGraph g => g a b -> [NGroup]
- Data.Graph.Analysis.Algorithms.Directed: accessibleFrom :: (Graph g) => g a b -> [Node] -> [Node]
+ Data.Graph.Analysis.Algorithms.Directed: accessibleFrom :: Graph g => g a b -> [Node] -> [Node]
- Data.Graph.Analysis.Algorithms.Directed: accessibleFrom' :: (Graph g) => g a b -> Set Node -> Set Node
+ Data.Graph.Analysis.Algorithms.Directed: accessibleFrom' :: Graph g => g a b -> Set Node -> Set Node
- Data.Graph.Analysis.Algorithms.Directed: accessibleOnlyFrom :: (Graph g) => g a b -> [Node] -> [Node]
+ Data.Graph.Analysis.Algorithms.Directed: accessibleOnlyFrom :: Graph g => g a b -> [Node] -> [Node]
- Data.Graph.Analysis.Algorithms.Directed: accessibleOnlyFrom' :: (Graph g) => g a b -> Set Node -> Set Node
+ Data.Graph.Analysis.Algorithms.Directed: accessibleOnlyFrom' :: Graph g => g a b -> Set Node -> Set Node
- Data.Graph.Analysis.Algorithms.Directed: endBy :: (Graph g) => (g a b -> Node -> NGroup) -> g a b -> LNGroup a
+ Data.Graph.Analysis.Algorithms.Directed: endBy :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNGroup a
- Data.Graph.Analysis.Algorithms.Directed: endBy' :: (Graph g) => (g a b -> Node -> NGroup) -> g a b -> NGroup
+ Data.Graph.Analysis.Algorithms.Directed: endBy' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> NGroup
- Data.Graph.Analysis.Algorithms.Directed: endNode :: (Graph g) => (g a b -> Node -> NGroup) -> g a b -> LNode a -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: endNode :: Graph g => (g a b -> Node -> NGroup) -> g a b -> LNode a -> Bool
- Data.Graph.Analysis.Algorithms.Directed: endNode' :: (Graph g) => (g a b -> Node -> NGroup) -> g a b -> Node -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: endNode' :: Graph g => (g a b -> Node -> NGroup) -> g a b -> Node -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isLeaf :: (Graph g) => g a b -> LNode a -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isLeaf :: Graph g => g a b -> LNode a -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isLeaf' :: (Graph g) => g a b -> Node -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isLeaf' :: Graph g => g a b -> Node -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isRoot :: (Graph g) => g a b -> LNode a -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isRoot :: Graph g => g a b -> LNode a -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isRoot' :: (Graph g) => g a b -> Node -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isRoot' :: Graph g => g a b -> Node -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isSingleton :: (Graph g) => g a b -> LNode a -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isSingleton :: Graph g => g a b -> LNode a -> Bool
- Data.Graph.Analysis.Algorithms.Directed: isSingleton' :: (Graph g) => g a b -> Node -> Bool
+ Data.Graph.Analysis.Algorithms.Directed: isSingleton' :: Graph g => g a b -> Node -> Bool
- Data.Graph.Analysis.Algorithms.Directed: leafMinPaths :: (Graph g) => g a b -> [LNGroup a]
+ Data.Graph.Analysis.Algorithms.Directed: leafMinPaths :: Graph g => g a b -> [LNGroup a]
- Data.Graph.Analysis.Algorithms.Directed: leafMinPaths' :: (Graph g) => g a b -> [NGroup]
+ Data.Graph.Analysis.Algorithms.Directed: leafMinPaths' :: Graph g => g a b -> [NGroup]
- Data.Graph.Analysis.Algorithms.Directed: leavesOf :: (Graph g) => g a b -> LNGroup a
+ Data.Graph.Analysis.Algorithms.Directed: leavesOf :: Graph g => g a b -> LNGroup a
- Data.Graph.Analysis.Algorithms.Directed: leavesOf' :: (Graph g) => g a b -> NGroup
+ Data.Graph.Analysis.Algorithms.Directed: leavesOf' :: Graph g => g a b -> NGroup
- Data.Graph.Analysis.Algorithms.Directed: rootsOf :: (Graph g) => g a b -> LNGroup a
+ Data.Graph.Analysis.Algorithms.Directed: rootsOf :: Graph g => g a b -> LNGroup a
- Data.Graph.Analysis.Algorithms.Directed: rootsOf' :: (Graph g) => g a b -> NGroup
+ Data.Graph.Analysis.Algorithms.Directed: rootsOf' :: Graph g => g a b -> NGroup
- Data.Graph.Analysis.Algorithms.Directed: singletonsOf :: (Graph g) => g a b -> LNGroup a
+ Data.Graph.Analysis.Algorithms.Directed: singletonsOf :: Graph g => g a b -> LNGroup a
- Data.Graph.Analysis.Algorithms.Directed: singletonsOf' :: (Graph g) => g a b -> NGroup
+ Data.Graph.Analysis.Algorithms.Directed: singletonsOf' :: Graph g => g a b -> NGroup
- Data.Graph.Analysis.Reporting: Doc :: FilePath -> String -> FilePath -> DocInline -> String -> String -> [(DocGraph, DocInline)] -> [DocElement] -> Document
+ Data.Graph.Analysis.Reporting: Doc :: FilePath -> String -> FilePath -> DocInline -> String -> String -> [(Either DocGraph DocInline, DocInline)] -> [DocElement] -> Document
- Data.Graph.Analysis.Reporting: createDocument :: (DocumentGenerator dg) => dg -> Document -> IO (Maybe FilePath)
+ Data.Graph.Analysis.Reporting: createDocument :: DocumentGenerator dg => dg -> Document -> IO (Maybe FilePath)
- Data.Graph.Analysis.Reporting: docExtension :: (DocumentGenerator dg) => dg -> String
+ Data.Graph.Analysis.Reporting: docExtension :: DocumentGenerator dg => dg -> String
- Data.Graph.Analysis.Reporting: legend :: Document -> [(DocGraph, DocInline)]
+ Data.Graph.Analysis.Reporting: legend :: Document -> [(Either DocGraph DocInline, DocInline)]
- Data.Graph.Analysis.Types: class (ClusterType (Cluster cl)) => ClusterLabel cl where { type family Cluster cl; type family NodeLabel cl; }
+ Data.Graph.Analysis.Types: class ClusterType (Cluster cl) => ClusterLabel cl where { type family Cluster cl; type family NodeLabel cl; }
- Data.Graph.Analysis.Types: class (Ord c) => ClusterType c
+ Data.Graph.Analysis.Types: class Ord c => ClusterType c
- Data.Graph.Analysis.Types: clustID :: (ClusterType c) => c -> Maybe GraphID
+ Data.Graph.Analysis.Types: clustID :: ClusterType c => c -> Maybe GraphID
- Data.Graph.Analysis.Types: cluster :: (ClusterLabel cl) => cl -> Cluster cl
+ Data.Graph.Analysis.Types: cluster :: ClusterLabel cl => cl -> Cluster cl
- Data.Graph.Analysis.Types: nodeLabel :: (ClusterLabel cl) => cl -> NodeLabel cl
+ Data.Graph.Analysis.Types: nodeLabel :: ClusterLabel cl => cl -> NodeLabel cl
- Data.Graph.Analysis.Utils: addLabels :: (Graph g) => g a b -> [Node] -> [LNode a]
+ Data.Graph.Analysis.Utils: addLabels :: Graph g => g a b -> [Node] -> [LNode a]
- Data.Graph.Analysis.Utils: clusterCount :: (Graph g) => g (GenCluster a) b -> IntMap Int
+ Data.Graph.Analysis.Utils: clusterCount :: Graph g => g (GenCluster a) b -> IntMap Int
- Data.Graph.Analysis.Utils: compact :: (DynGraph gr) => gr a b -> gr a [b]
+ Data.Graph.Analysis.Utils: compact :: DynGraph gr => gr a b -> gr a [b]
- Data.Graph.Analysis.Utils: compact' :: (DynGraph gr) => gr a b -> gr a Int
+ Data.Graph.Analysis.Utils: compact' :: DynGraph gr => gr a b -> gr a Int
- Data.Graph.Analysis.Utils: delLNodes :: (DynGraph gr) => LNGroup a -> gr a b -> gr a b
+ Data.Graph.Analysis.Utils: delLNodes :: DynGraph gr => LNGroup a -> gr a b -> gr a b
- Data.Graph.Analysis.Utils: filterNodes :: (Graph g) => (g a b -> LNode a -> Bool) -> g a b -> [LNode a]
+ Data.Graph.Analysis.Utils: filterNodes :: Graph g => (g a b -> LNode a -> Bool) -> g a b -> [LNode a]
- Data.Graph.Analysis.Utils: filterNodes' :: (Graph g) => (g a b -> Node -> Bool) -> g a b -> [Node]
+ Data.Graph.Analysis.Utils: filterNodes' :: Graph g => (g a b -> Node -> Bool) -> g a b -> [Node]
- Data.Graph.Analysis.Utils: fixPoint :: (Eq a) => (a -> a) -> a -> a
+ Data.Graph.Analysis.Utils: fixPoint :: Eq a => (a -> a) -> a -> a
- Data.Graph.Analysis.Utils: getLabels :: (Graph g) => g a b -> [Node] -> [a]
+ Data.Graph.Analysis.Utils: getLabels :: Graph g => g a b -> [Node] -> [a]
- Data.Graph.Analysis.Utils: groupElems :: (Ord b) => (a -> b) -> [a] -> [(b, [a])]
+ Data.Graph.Analysis.Utils: groupElems :: Ord b => (a -> b) -> [a] -> [(b, [a])]
- Data.Graph.Analysis.Utils: labels :: (Graph g) => g a b -> [a]
+ Data.Graph.Analysis.Utils: labels :: Graph g => g a b -> [a]
- Data.Graph.Analysis.Utils: mkSimple :: (DynGraph gr) => gr a b -> gr a b
+ Data.Graph.Analysis.Utils: mkSimple :: DynGraph gr => gr a b -> gr a b
- Data.Graph.Analysis.Utils: nlmap :: (DynGraph gr) => (LNode a -> c) -> gr a b -> gr c b
+ Data.Graph.Analysis.Utils: nlmap :: DynGraph gr => (LNode a -> c) -> gr a b -> gr c b
- Data.Graph.Analysis.Utils: reCluster :: (DynGraph g) => g (GenCluster a) b -> g (GenCluster a) b
+ Data.Graph.Analysis.Utils: reCluster :: DynGraph g => g (GenCluster a) b -> g (GenCluster a) b
- Data.Graph.Analysis.Utils: reClusterBy :: (DynGraph g) => IntMap Int -> g (GenCluster a) b -> g (GenCluster a) b
+ Data.Graph.Analysis.Utils: reClusterBy :: DynGraph g => IntMap Int -> g (GenCluster a) b -> g (GenCluster a) b
- Data.Graph.Analysis.Utils: setCluster :: (DynGraph gr) => IntMap Int -> gr a b -> gr (GenCluster a) b
+ Data.Graph.Analysis.Utils: setCluster :: DynGraph gr => IntMap Int -> gr a b -> gr (GenCluster a) b
- Data.Graph.Analysis.Utils: shuffle :: (RandomGen g) => g -> [a] -> ([a], g)
+ Data.Graph.Analysis.Utils: shuffle :: RandomGen g => g -> [a] -> ([a], g)
- Data.Graph.Analysis.Utils: sortMinMax :: (Ord a) => [a] -> ([a], a, a)
+ Data.Graph.Analysis.Utils: sortMinMax :: Ord a => [a] -> ([a], a, a)
- Data.Graph.Analysis.Visualisation: assignCluster :: (ClusterLabel cl) => LNode cl -> LNodeCluster (Cluster cl) (NodeLabel cl)
+ Data.Graph.Analysis.Visualisation: assignCluster :: ClusterLabel cl => LNode cl -> LNodeCluster (Cluster cl) (NodeLabel cl)
- Data.Graph.Analysis.Visualisation: blockPrint :: (Show a) => [a] -> String
+ Data.Graph.Analysis.Visualisation: blockPrint :: Show a => [a] -> String
- Data.Graph.Analysis.Visualisation: blockPrintList :: (Show a) => [a] -> String
+ Data.Graph.Analysis.Visualisation: blockPrintList :: Show a => [a] -> String
- Data.Graph.Analysis.Visualisation: blockPrintWith :: (Show a) => String -> [a] -> String
+ Data.Graph.Analysis.Visualisation: blockPrintWith :: Show a => String -> [a] -> String
- Data.Graph.Analysis.Visualisation: graphviz :: (Ord cl) => GraphvizParams nl el cl l -> GraphData nl el -> DotGraph Node
+ Data.Graph.Analysis.Visualisation: graphviz :: Ord cl => GraphvizParams nl el cl l -> GraphData nl el -> DotGraph Node
- Data.Graph.Analysis.Visualisation: graphvizClusters :: (ClusterLabel nl) => GraphvizParams nl el (Cluster nl) (NodeLabel nl) -> GraphData nl el -> DotGraph Node
+ Data.Graph.Analysis.Visualisation: graphvizClusters :: ClusterLabel nl => GraphvizParams nl el (Cluster nl) (NodeLabel nl) -> GraphData nl el -> DotGraph Node
- Data.Graph.Analysis.Visualisation: showCycle :: (Show a) => [a] -> String
+ Data.Graph.Analysis.Visualisation: showCycle :: Show a => [a] -> String
- Data.Graph.Analysis.Visualisation: showNodes :: (Show a) => [a] -> String
+ Data.Graph.Analysis.Visualisation: showNodes :: Show a => [a] -> String
- Data.Graph.Analysis.Visualisation: showPath :: (Show a) => [a] -> String
+ Data.Graph.Analysis.Visualisation: showPath :: Show a => [a] -> String

Files

Data/Graph/Analysis/Reporting.hs view
@@ -35,7 +35,8 @@ import Data.Time(getZonedTime, zonedTimeToLocalTime, formatTime) import Control.Exception.Extensible(SomeException(..), tryJust) import System.Directory(createDirectoryIfMissing)-import System.FilePath((</>), makeRelative)+import System.FilePath(makeRelative)+import System.FilePath.Posix((</>)) import System.Locale(defaultTimeLocale) import Control.Monad(liftM, when) @@ -64,7 +65,7 @@                     , author         :: String                     , date           :: String                       -- | Main-matter-                    , legend         :: [(DocGraph, DocInline)]+                    , legend         :: [(Either DocGraph DocInline, DocInline)]                     , content        :: [DocElement]                     }                 deriving (Eq, Ord, Show, Read)@@ -158,20 +159,21 @@                                       }  legendToElement           :: FilePath -> FilePath -> VisProperties-                             -> [(DocGraph, DocInline)]+                             -> [(Either DocGraph DocInline, DocInline)]                              -> IO (Maybe DocElement) legendToElement _  _   _  [] = return Nothing legendToElement fp gfp vp ls = do defs <- mapM (uncurry (legToDef fp gfp vp)) ls                                   let df   = Definitions defs                                   return $ Just $ Section (Text "Legend") [df] -legToDef                  :: FilePath -> FilePath -> VisProperties-                             -> DocGraph -> DocInline-                             -> IO (DocInline, DocInline)-legToDef fp gfp vp dg def = liftM (flip (,) def)-                            $ graphImage' fp gfp vp' dg+legToDef :: FilePath -> FilePath -> VisProperties+            -> Either DocGraph DocInline -> DocInline+            -> IO (DocInline, DocInline)+legToDef fp gfp vp (Left dg) def = liftM ((,) def)+                                   $ graphImage' fp gfp vp' dg   where     vp' = vp { size = DefaultSize }+legToDef _ _ _ (Right di) def = return (def,di)  -- | Return today's date as a string, e.g. \"Monday 1 January, 2000\". --   This arbitrary format is chosen as there doesn't seem to be a way@@ -267,7 +269,7 @@ -- | Using a 6:4 ratio, create the given 'Point' representing --   width,height from the width. createSize   :: Double -> GraphSize-createSize w = GivenSize $ Point w (w*4/6)+createSize w = GivenSize $ createPoint w (w*4/6)  -- | Replace all @.@ with @-@ in the given 'FilePath', since some output --   formats (e.g. LaTeX) don't like extraneous @.@'s in the filename.
Data/Graph/Analysis/Utils.hs view
@@ -194,16 +194,15 @@       rmAttrs = snd       isPoint Pos{} = True       isPoint _     = False-      getPos (n,(as,l)) = PLabel { xPos   = round x-                                 , yPos   = round y+      getPos (n,(as,l)) = PLabel { xPos   = round $ xCoord pnt+                                 , yPos   = round $ yCoord pnt                                  , pnode  = n                                  , plabel = l                                  }           where-            -- Assume that positions can't be doubles.             -- Also assuming that we're not dealing with a             -- spline-type point.-            (Pos (PointPos (Point x y))) = fromJust $ find isPoint as+            (Pos (PointPos pnt)) = fromJust $ find isPoint as  -- | Returns the positions of the nodes in the graph, as found using --   Graphviz.  The 'Bool' parameter denotes if the graph is directed
Graphalyze.cabal view
@@ -1,5 +1,5 @@ Name:                Graphalyze-Version:             0.10.0.1+Version:             0.11.0.0 Synopsis:            Graph-Theoretic Analysis library. Description:         A library to use graph theory to analyse the relationships                         inherent in discrete data.@@ -31,7 +31,7 @@                          time,                          bktrees >= 0.2 && <0.4,                          fgl >= 5.4.2.3 && < 5.5,-                         graphviz >= 2999.10.0.0 && < 2999.11.0.0,+                         graphviz >= 2999.11.0.0 && < 2999.12.0.0,                          pandoc >= 1.5 && < 1.7          Exposed-Modules:     Data.Graph.Analysis