linearmap-category 0.6.0.1 → 0.6.0.2
raw patch · 5 files changed
+35/−22 lines, 5 filesdep ~QuickCheckdep ~containersdep ~data-default-classPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: QuickCheck, containers, data-default-class, hashable, lens, linear, singletons-base, tasty, tasty-quickcheck, template-haskell, th-abstraction, transformers, vector-space
API changes (from Hackage documentation)
- Math.LinearMap.Category.Instances.Deriving: instance 0 Math.LinearMap.Category.Instances.Deriving.# Data.Void.Void
- Math.LinearMap.Category.Instances.Deriving: instance Data.Default.Class.Default Math.LinearMap.Category.Instances.Deriving.FiniteDimensionalFromBasisDerivationConfig
- Math.LinearMap.Category.Instances.Deriving: instance Data.Default.Class.Default Math.LinearMap.Category.Instances.Deriving.LinearSpaceFromBasisDerivationConfig
- Math.LinearMap.Category.Instances.Deriving: instance Math.LinearMap.Category.Instances.Deriving.KnownCardinality Data.Void.Void
+ Math.LinearMap.Category.Instances.Deriving: instance 0 Math.LinearMap.Category.Instances.Deriving.# GHC.Base.Void
+ Math.LinearMap.Category.Instances.Deriving: instance Data.Default.Internal.Default Math.LinearMap.Category.Instances.Deriving.FiniteDimensionalFromBasisDerivationConfig
+ Math.LinearMap.Category.Instances.Deriving: instance Data.Default.Internal.Default Math.LinearMap.Category.Instances.Deriving.LinearSpaceFromBasisDerivationConfig
+ Math.LinearMap.Category.Instances.Deriving: instance Math.LinearMap.Category.Instances.Deriving.KnownCardinality GHC.Base.Void
- Math.VectorSpace.ZeroDimensional: data ZeroDim s
+ Math.VectorSpace.ZeroDimensional: data () => ZeroDim s
Files
- Math/LinearMap/Category/Class.hs +3/−2
- Math/LinearMap/Category/Instances.hs +8/−4
- Math/VectorSpace/Docile.hs +3/−0
- linearmap-category.cabal +13/−13
- test/tasty/test.hs +8/−3
Math/LinearMap/Category/Class.hs view
@@ -1824,6 +1824,7 @@ => VectorSpace (GenericTupleDual f g p) instance ( InnerSpace (DualVector (f p)), InnerSpace (DualVector (g p)) , Scalar (DualVector (f p)) ~ Scalar (DualVector (g p))+ , AdditiveGroup (Scalar (DualVector (g p))) , Num (Scalar (DualVector (f p))) ) => InnerSpace (GenericTupleDual f g p) instance (AdditiveGroup (DualVector (f p)), AdditiveGroup (DualVector (g p)))@@ -2225,7 +2226,7 @@ Coercion -> Coercion -instance ∀ s m . ( Num' s+instance ∀ s m . ( Num s, Num' s , Semimanifold m, LinearSpace (Needle (VRep m)) , Scalar (Needle m) ~ s , Scalar (Needle (VRep m)) ~ s )@@ -2253,7 +2254,7 @@ coerceDoubleDual = case coerceDoubleDual @(Needle (VRep m)) of VSCCoercion -> VSCCoercion -instance ∀ s m . ( Num' s+instance ∀ s m . ( Num s, Num' s , Semimanifold m , LinearSpace (Needle (VRep m)) , TensorSpace (DualVector (Needle (VRep m)))
Math/LinearMap/Category/Instances.hs view
@@ -759,22 +759,26 @@ + (asLinearMap$vw)<.>(asLinearMap$vw') instance ( TensorSpace u, TensorSpace v, TensorSpace w- , Num s, Scalar u ~ s, Scalar v ~ s, Scalar w ~ s+ , AdditiveGroup s, Num s+ , Scalar u ~ s, Scalar v ~ s, Scalar w ~ s , InnerSpace (Tensor s u (Tensor s v w)) ) => InnerSpace (Tensor s (Tensor s u v) w) where s <.> t = (rassocTensor$s)<.>(rassocTensor$t) instance ( LinearSpace u, TensorSpace v, TensorSpace w- , Num s, Scalar u ~ s, Scalar v ~ s, Scalar w ~ s+ , AdditiveGroup s, Num s+ , Scalar u ~ s, Scalar v ~ s, Scalar w ~ s , InnerSpace (LinearMap s u (Tensor s v w)) ) => InnerSpace (Tensor s (LinearMap s u v) w) where s <.> t = (hasteLinearMap$s)<.>(hasteLinearMap$t) instance ( LinearSpace u, LinearSpace v, TensorSpace w- , Num s, Scalar u ~ s, Scalar v ~ s, Scalar w ~ s+ , AdditiveGroup s, Num s+ , Scalar u ~ s, Scalar v ~ s, Scalar w ~ s , InnerSpace (LinearMap s u (LinearMap s v w)) ) => InnerSpace (LinearMap s (Tensor s u v) w) where s <.> t = (curryLinearMap$s)<.>(curryLinearMap$t) instance ( LinearSpace u, LinearSpace v, TensorSpace w- , Num s, Scalar u ~ s, Scalar v ~ s, Scalar w ~ s+ , AdditiveGroup s, Num s+ , Scalar u ~ s, Scalar v ~ s, Scalar w ~ s , InnerSpace (Tensor s u (LinearMap s v w)) ) => InnerSpace (LinearMap s (LinearMap s u v) w) where s <.> t = (coCurryLinearMap$s)<.>(coCurryLinearMap$t)
Math/VectorSpace/Docile.hs view
@@ -1087,6 +1087,9 @@ where du = subbasisDimension (entireBasis :: SubBasis u) dv = subbasisDimension (entireBasis :: SubBasis v) +{-# DEPRECATED (\$) "The current inversion algorithm is wrong in rare edge cases. It is also dubious how useful it is given that 'SimpleSpace' has in practice just Euclidean-isomorphic spaces as instances, for which off-the-shelf matrix inversion could be used. These functions will probably be removed in favour of something e.g. conjugate-gradient based." #-}++{-# DEPRECATED pseudoInverse "The current inversion algorithm is wrong in rare edge cases. It is also dubious how useful it is given that 'SimpleSpace' has in practice just Euclidean-isomorphic spaces as instances, for which off-the-shelf matrix inversion could be used. These functions will probably be removed in favour of something e.g. conjugate-gradient based." #-} pseudoInverse :: ∀ u v . ( SimpleSpace u, SimpleSpace v, Scalar u ~ Scalar v ) => (u+>v) -> v+>u
linearmap-category.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: linearmap-category-version: 0.6.0.1+version: 0.6.0.2 synopsis: Native, complete-ish, matrix-free linear algebra. description: The term /numerical linear algebra/ is often used almost synonymous with /matrix modifications/. However, what's interesting@@ -71,27 +71,27 @@ Math.VectorSpace.Docile other-extensions: FlexibleInstances, UndecidableInstances, FunctionalDependencies, TypeOperators, TypeFamilies build-depends: base >=4.8 && <5,- vector-space >=0.11 && <0.18, MemoTrie,+ vector-space >=0.11 && <0.20, MemoTrie <0.7, constrained-categories >=0.3 && <0.5,- containers,+ containers <0.9, vector >=0.12 && <0.14,- tagged,+ tagged <0.9, free-vector-spaces >= 0.1.4 && < 0.3,- linear, lens, transformers,+ linear <1.24, lens <5.4, transformers <0.7, manifolds-core >= 0.6.1.0 && < 0.7,- semigroups, hashable,- data-default-class,+ semigroups <0.21, hashable <1.6,+ data-default-class <0.3, ieee754 >= 0.7 && < 0.9,- call-stack,- template-haskell >=2.12 && <2.21,- th-abstraction >=0.4 && <0.6,+ call-stack <0.5,+ template-haskell >=2.12 && <2.24,+ th-abstraction >=0.4 && <0.8, ghc-typelits-natnormalise >=0.7 && <0.8, type-natural >=1.0 && <1.4,- QuickCheck >=2.11 && <2.15+ QuickCheck >=2.15 && <2.16 if flag(singletons3) build-depends: singletons >=3.0 && <3.3,- singletons-base >=3.0 && <3.3+ singletons-base >=3.0 && <3.5 else build-depends: singletons >=2.7 && <3.0@@ -107,7 +107,7 @@ , manifolds-core , linear, vector , constrained-categories- , tasty, tasty-quickcheck+ , tasty <1.6, tasty-quickcheck <0.12 ghc-options: -threaded "-with-rtsopts -N8 -M2G" default-language: Haskell2010
test/tasty/test.hs view
@@ -143,9 +143,10 @@ [ testGroup "Euclidean space" [ testProperty "co-Riesz inversion" $ \v -> (arr coRiesz\$coRiesz-+$>v) === (v :: V4 ℝ)- , testProperty "Random operator inversion" -- This isn't really expected to work- $ \f v -> (f \$ (f :: V4 ℝ+>V4 ℝ) $ v) ≈≈≈ v -- /always/, but singular matrices are- ] -- very seldom in the @Arbitrary@ instance.+-- , testProperty "Random operator inversion"+-- $ \f v -> not (isSingular f)+-- ==> (f \$ (f :: V4 ℝ+>V4 ℝ) $ v) ≈≈≈ v+ ] , testGroup "Basis-derived space" [ testProperty "Semimanifold addition" $ \v w -> v.+~^w === (v^+^w :: ℝ⁵ Int)@@ -237,6 +238,10 @@ v≈≈≈w | magnitudeSq (v^-^w) < (magnitudeSq v + magnitudeSq w)*1e-8 = QC.property True | otherwise = v===w++isSingular :: ∀ v n . (n`Dimensional`v, Scalar v ~ ℝ)+ => (v +> v) -> Bool+isSingular _ = undefined uar :: UArr.Unbox a => [a] -> UArr.Vector a uar = UArr.fromList