manifolds-core 0.4.5.0 → 0.5.0.0
raw patch · 3 files changed
+12/−5 lines, 3 files
Files
- Math/Manifold/Core/PseudoAffine.hs +2/−3
- Math/Manifold/Core/Types/Internal.hs +9/−1
- manifolds-core.cabal +1/−1
Math/Manifold/Core/PseudoAffine.hs view
@@ -215,10 +215,9 @@ -- it can have a different topology, the prime example being 'TangentBundle', where -- nearby points may have differently-oriented tangent spaces. data FibreBundle b f = FibreBundle- { baseSpace :: !(Interior b)+ { baseSpace :: !b , fibreSpace :: !f- } deriving (Generic)-deriving instance (Show (Interior b), Show f) => Show (FibreBundle b f)+ } deriving (Generic, Show) -- | Points on a manifold, combined with vectors in the respective tangent space. type TangentBundle m = FibreBundle m (Needle m)
Math/Manifold/Core/Types/Internal.hs view
@@ -16,6 +16,7 @@ import Math.Manifold.VectorSpace.ZeroDimensional +import Data.Fixed (mod') -- | The zero-dimensional sphere is actually just two points. Implementation might@@ -29,8 +30,11 @@ newtype S¹ = S¹Polar { φParamS¹ :: Double -- ^ Must be in range @[-π, π[@. } deriving (Show) +instance Eq S¹ where+ S¹Polar φ == S¹Polar φ' = φ `mod'` (2*pi) == φ' `mod'` (2*pi) -newtype ℝP¹ = HemisphereℝP¹Polar { φParamℝP¹ :: Double -- ^ Range @[-π/2,π/2[@.++newtype ℝP¹ = HemisphereℝP¹Polar { φParamℝP¹ :: Double -- ^ Range @[-π\/2,π\/2[@. } deriving (Show) -- | The ordinary unit sphere.@@ -38,6 +42,10 @@ , φParamS² :: !Double -- ^ Range @[-π, π[@. } deriving (Show) +instance Eq S² where+ S²Polar θ φ == S²Polar θ' φ'+ | θ > 0, θ < pi = θ == θ' && φ `mod'` (2*pi) == φ' `mod'` (2*pi)+ | otherwise = θ == θ' -- | The two-dimensional real projective space, implemented as a disk with -- opposing points on the rim glued together. Image this disk as the northern hemisphere
manifolds-core.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: manifolds-core-version: 0.4.5.0+version: 0.5.0.0 synopsis: The basic classes for the manifolds hierarchy. description: The basic classes for the <http://hackage.haskell.org/package/manifolds manifolds> hierarchy.