- inspect,
- toList,
- )
-import qualified Data.Vector.Fixed as V (
- length,
- )
-
-
--- * Low-dimension vector wrappers.
---
--- These wrappers are instances of 'Vector', so they inherit all of
--- the userful instances defined above. But, they use fixed
--- constructors, so you can pattern match out the individual
--- components.
-
-data D1 a = D1 a deriving (Show, Eq)
-type instance Dim D1 = N1
-instance Vector D1 a where
- inspect (D1 x) (Fun f) = f x
- construct = Fun D1
-
-data D2 a = D2 a a deriving (Show, Eq)
-type instance Dim D2 = N2
-instance Vector D2 a where
- inspect (D2 x y) (Fun f) = f x y
- construct = Fun D2
+ toList )
+import Data.Vector.Fixed (
+ (!),
+ foldl,
+ length )
+import Data.Vector.Fixed.Boxed (
+ Vec,
+ Vec2,
+ Vec3,
+ Vec4,
+ Vec5 )
+import NumericPrelude hiding ( abs, length, foldl )