diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Numeric/ContainerBoot.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Numeric/ContainerBoot.hs b/lib/Numeric/ContainerBoot.hs index f628e10..f7a40fa 100644 --- a/lib/Numeric/ContainerBoot.hs +++ b/lib/Numeric/ContainerBoot.hs | |||
@@ -92,7 +92,7 @@ class (Complexable c, Fractional e, Element e) => Container c e where | |||
92 | equal :: c e -> c e -> Bool | 92 | equal :: c e -> c e -> Bool |
93 | -- | 93 | -- |
94 | -- element by element inverse tangent | 94 | -- element by element inverse tangent |
95 | arctan :: c e -> c e -> c e | 95 | arctan2 :: c e -> c e -> c e |
96 | -- | 96 | -- |
97 | -- | cannot implement instance Functor because of Element class constraint | 97 | -- | cannot implement instance Functor because of Element class constraint |
98 | cmap :: (Element a, Element b) => (a -> b) -> c a -> c b | 98 | cmap :: (Element a, Element b) => (a -> b) -> c a -> c b |
@@ -133,7 +133,7 @@ instance Container Vector Float where | |||
133 | mul = vectorZipF Mul | 133 | mul = vectorZipF Mul |
134 | divide = vectorZipF Div | 134 | divide = vectorZipF Div |
135 | equal u v = dim u == dim v && maxElement (vectorMapF Abs (sub u v)) == 0.0 | 135 | equal u v = dim u == dim v && maxElement (vectorMapF Abs (sub u v)) == 0.0 |
136 | arctan = vectorZipF ATan2 | 136 | arctan2 = vectorZipF ATan2 |
137 | scalar x = fromList [x] | 137 | scalar x = fromList [x] |
138 | konst = constantD | 138 | konst = constantD |
139 | build = buildV | 139 | build = buildV |
@@ -156,7 +156,7 @@ instance Container Vector Double where | |||
156 | mul = vectorZipR Mul | 156 | mul = vectorZipR Mul |
157 | divide = vectorZipR Div | 157 | divide = vectorZipR Div |
158 | equal u v = dim u == dim v && maxElement (vectorMapR Abs (sub u v)) == 0.0 | 158 | equal u v = dim u == dim v && maxElement (vectorMapR Abs (sub u v)) == 0.0 |
159 | arctan = vectorZipR ATan2 | 159 | arctan2 = vectorZipR ATan2 |
160 | scalar x = fromList [x] | 160 | scalar x = fromList [x] |
161 | konst = constantD | 161 | konst = constantD |
162 | build = buildV | 162 | build = buildV |
@@ -179,7 +179,7 @@ instance Container Vector (Complex Double) where | |||
179 | mul = vectorZipC Mul | 179 | mul = vectorZipC Mul |
180 | divide = vectorZipC Div | 180 | divide = vectorZipC Div |
181 | equal u v = dim u == dim v && maxElement (mapVector magnitude (sub u v)) == 0.0 | 181 | equal u v = dim u == dim v && maxElement (mapVector magnitude (sub u v)) == 0.0 |
182 | arctan = vectorZipC ATan2 | 182 | arctan2 = vectorZipC ATan2 |
183 | scalar x = fromList [x] | 183 | scalar x = fromList [x] |
184 | konst = constantD | 184 | konst = constantD |
185 | build = buildV | 185 | build = buildV |
@@ -202,7 +202,7 @@ instance Container Vector (Complex Float) where | |||
202 | mul = vectorZipQ Mul | 202 | mul = vectorZipQ Mul |
203 | divide = vectorZipQ Div | 203 | divide = vectorZipQ Div |
204 | equal u v = dim u == dim v && maxElement (mapVector magnitude (sub u v)) == 0.0 | 204 | equal u v = dim u == dim v && maxElement (mapVector magnitude (sub u v)) == 0.0 |
205 | arctan = vectorZipQ ATan2 | 205 | arctan2 = vectorZipQ ATan2 |
206 | scalar x = fromList [x] | 206 | scalar x = fromList [x] |
207 | konst = constantD | 207 | konst = constantD |
208 | build = buildV | 208 | build = buildV |
@@ -227,7 +227,7 @@ instance (Container Vector a) => Container Matrix a where | |||
227 | mul = liftMatrix2 mul | 227 | mul = liftMatrix2 mul |
228 | divide = liftMatrix2 divide | 228 | divide = liftMatrix2 divide |
229 | equal a b = cols a == cols b && flatten a `equal` flatten b | 229 | equal a b = cols a == cols b && flatten a `equal` flatten b |
230 | arctan = liftMatrix2 arctan | 230 | arctan2 = liftMatrix2 arctan2 |
231 | scalar x = (1><1) [x] | 231 | scalar x = (1><1) [x] |
232 | konst v (r,c) = reshape c (konst v (r*c)) | 232 | konst v (r,c) = reshape c (konst v (r*c)) |
233 | build = buildM | 233 | build = buildM |