-- | A generalized implementation for Jacobi, Gauss-Seidel, etc. All
-- that we really need to know is how to construct the matrix M, so we
-- take a function that does it as an argument.
-classical_iteration :: (Field.C a, Arity m)
+classical_iteration :: (Eq a, Field.C a, Arity m)
=> (Mat m m a -> Mat m m a)
-> Mat m m a
-> Mat m N1 a
-- | Perform one iteration of successive over-relaxation.
--
sor_iteration :: forall m a.
- (Field.C a, Arity m)
+ (Eq a, Field.C a, Arity m)
=> a -- ^ Omega
-> Mat m m a -- ^ Matrix A
-> Mat m N1 a -- ^ Vector b
-- | Compute an infinite list of SOR iterations starting with the
-- vector x0.
-sor_iterations :: (Field.C a, Arity m)
+sor_iterations :: (Eq a, Field.C a, Arity m)
=> a
-> Mat m m a
-> Mat m N1 a
-- | Perform one iteration of Gauss-Seidel.
-gauss_seidel_iteration :: (Field.C a, Arity m)
+gauss_seidel_iteration :: (Eq a, Field.C a, Arity m)
=> Mat m m a
-> Mat m N1 a
-> Mat m N1 a
-- | Compute an infinite list of Gauss-Seidel iterations starting with
-- the vector x0.
-gauss_seidel_iterations :: (Field.C a, Arity m)
+gauss_seidel_iterations :: (Eq a, Field.C a, Arity m)
=> Mat m m a
-> Mat m N1 a
-> Mat m N1 a
-- >>> jacobi_iteration m b x1
-- ((0.0),(0.25))
--
-jacobi_iteration :: (Field.C a, Arity m)
+jacobi_iteration :: (Eq a, Field.C a, Arity m)
=> Mat m m a
-> Mat m N1 a
-> Mat m N1 a
-- | Compute an infinite list of Jacobi iterations starting with the
-- vector x0.
-jacobi_iterations :: (Field.C a, Arity m)
+jacobi_iterations :: (Eq a, Field.C a, Arity m)
=> Mat m m a
-> Mat m N1 a
-> Mat m N1 a