1||| Implementations of algebraic interfaces (group, ring, etc) for numeric data types,
2||| and Complex number types.
3module Control.Algebra.NumericImplementations
6import Control.Algebra.VectorSpace
12Semigroup Integer where
21AbelianGroup Integer where
26RingWithUnity Integer where
44RingWithUnity Int where
57AbelianGroup Double where
62RingWithUnity Double where
93Semigroup a => Semigroup (Complex a) where
94 (<+>) (a :+ b) (c :+ d) = (a <+> c) :+ (b <+> d)
96Monoid a => Monoid (Complex a) where
97 neutral = (neutral :+ neutral)
99Group a => Group (Complex a) where
100 inverse (r :+ i) = (inverse r :+ inverse i)
102Ring a => AbelianGroup (Complex a) where {}
104Ring a => Ring (Complex a) where
105 (<.>) (a :+ b) (c :+ d) = (a <.> c <-> b <.> d) :+ (a <.> d <+> b <.> c)
107RingWithUnity a => RingWithUnity (Complex a) where
108 unity = (unity :+ neutral)
110RingWithUnity a => Module a (Complex a) where
111 (<#>) x = map (x <.>)
113RingWithUnity a => InnerProductSpace a (Complex a) where
114 (x :+ y) <||> z = realPart $ (x :+ inverse y) <.> z
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list