@@ -56,6 +56,7 @@ import Data.List (sort)
5656import Data.VectorSpace
5757import Data.Basis
5858import Data.AffineSpace
59+ import Data.VectorSpace.Free ()
5960import Data.LinearMap.HerMetric
6061import Data.Manifold.PseudoAffine
6162import Data.Manifold.TreeCover
@@ -67,26 +68,6 @@ import Control.DeepSeq
6768type R2 = Dia. V2 Double
6869type P2 = Dia. P2 Double
6970
70- instance AffineSpace R2 where
71- type Diff R2 = R2
72- (.-.) = (Dia. ^-^)
73- (.+^) = (Dia. ^+^)
74- instance AdditiveGroup R2 where
75- (^+^) = (Dia. ^+^)
76- zeroV = Dia. zero
77- negateV = Dia. negated
78- instance VectorSpace R2 where
79- type Scalar R2 = Double
80- (*^) = (Dia. *^)
81- instance HasBasis R2 where
82- type Basis R2 = Either () ()
83- basisValue (Left () ) = 1 ^& 0
84- basisValue (Right () ) = 0 ^& 1
85- decompose v = [(Left () , v^. _x), (Right () , v^. _y)]
86- decompose' v (Left () ) = v^. _x
87- decompose' v (Right () ) = v^. _y
88- instance InnerSpace R2 where
89- (<.>) = Dia. dot
9071instance FiniteDimensional R2 where
9172 dimension = Tagged 2
9273 basisIndex = Tagged bi where bi b = if (basisValue b:: R2 )^. _x > 0.5 then 0 else 1
@@ -112,10 +93,6 @@ instance LocallyCoercible R2 (R,R) where
11293instance LocallyCoercible (R ,R ) R2 where
11394 locallyTrivialDiffeomorphism = DiaTypes. r2
11495
115- instance AffineSpace P2 where
116- type Diff P2 = R2
117- (.-.) = (Dia. .-.)
118- (.+^) = (Dia. .+^)
11996instance Semimanifold P2 where
12097 type Needle P2 = R2
12198 fromInterior = id
0 commit comments