packages feed

Persistence 2.0.1 → 2.0.2

raw patch · 4 files changed

+24/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Persistence.cabal view
@@ -7,7 +7,7 @@ -- hash: 8b7fcc7836b916f046653da257033f5fbdeb90a49069ff85be71bca358f359c0  name:           Persistence-version:        2.0.1+version:        2.0.2 category:       Data, Math synopsis:       A versatile library for topological data analysis. description:    A topological data analysis library motivated by flexibility when it comes to the type of data being analyzed. If your data comes with a meaningful binary function into an ordered set, you can use Persistence to analyze your data. The library also provides functions for analyzing directed\/undirected, weighted\/unweighted graphs. See the README for resources on learning about topological data anlysis.@@ -33,9 +33,9 @@       Persistence.HasseDiagram       Persistence.SimplicialComplex   other-modules:+      Paths_Persistence       Persistence.Matrix       Persistence.Util-      Paths_Persistence   hs-source-dirs:       src   build-depends:
README.md view
@@ -51,4 +51,8 @@  3) Implement construction of the alpha-complex (sub-complex of the Delaunay triangulation where the vertices of every simplex are within a certain distance). +`Matrix.hs`:++1) This module ought to be completely rewritten for the sake of performance.+ See each of the files for an overview of its inner-workings.
changelog.md view
@@ -71,3 +71,13 @@ ### Changed  - Representation of graphs now takes half as much memory.++## 3.0++### Added++- Module for constructing graphs.++- More efficient algorithms for constructing the neighborhood graph.++- Algorithms for dealing with sets of trajectories in Euclidean space.
src/Persistence/SimplicialComplex.hs view
@@ -99,9 +99,9 @@  -- | Get the dimension of the highest dimensional simplex (constant time). getDim :: SimplicialComplex -> Int-getDim = L.length . snd+getDim = V.length . snd --- | Safely index into the adjacency matrix of a graph.+-- | Index into the adjacency matrix of a graph, flipping the indices if necessary. indexGraph :: Graph a -> (Int, Int) -> (a, Bool) indexGraph graph (i, j) =   if i < j then graph ! j ! i@@ -316,7 +316,7 @@                      -> SimplicialComplex makeRipsComplexLight scale metric dataSet =   let vector   = case dataSet of Left v -> v; Right l -> V.fromList l-      numVerts = L.length vector+      numVerts = V.length vector        --make a list with an entry for every dimension of simplices       organizeCliques 1 _       = []@@ -384,8 +384,8 @@                         -> Either (Vector b) [b]                         -> SimplicialComplex makeRipsComplexLightPar scale metric dataSet =-  let numVerts = L.length dataSet-      vector   = case dataSet of Left v -> v; Right l -> V.fromList l+  let vector   = case dataSet of Left v -> v; Right l -> V.fromList l+      numVerts = V.length vector        --make a list with an entry for every dimension of simplices       organizeCliques 1 _       = []@@ -508,7 +508,7 @@           if i == dim then (snd $ V.last ranks):(calc i1)           else ((snd $ ranks ! i1) - (fst $ ranks ! i)):(calc i1)   in-    if L.null $ snd sc then [fst sc]+    if V.null $ snd sc then [fst sc]     else L.reverse $ calc dim  -- | Calculates all of the Betti numbers in parallel.@@ -598,7 +598,7 @@           let i1 = i - 1           in (getUnsignedDiagonal $ normalFormInt $ imgInKerInt (boundOps ! i1) (boundOps ! i)):(calc i1)   in-    if L.null $ snd sc then [L.replicate (fst sc) 0]+    if V.null $ snd sc then [L.replicate (fst sc) 0]     else L.reverse $ L.map (L.filter (/=1)) $ calc dim  -- | Same as simplicialHomology except it computes each of the groups in parallel and uses parallel matrix computations.@@ -616,5 +616,5 @@           in evalPar (getUnsignedDiagonal $ normalFormIntPar $ --see Util for evalPar             imgInKerIntPar (boundOps ! i1) (boundOps ! i)) $ calc i1   in-    if L.null $ snd sc then [L.replicate (fst sc) 0]+    if V.null $ snd sc then [L.replicate (fst sc) 0]     else L.reverse $ L.map (L.filter (/=1)) $ calc dim