]> gitweb.michael.orlitzky.com - numerical-analysis.git/blobdiff - src/Normed.hs
Clean up imports everywhere.
[numerical-analysis.git] / src / Normed.hs
index 6f34a8dca406c13393896179b6b08c023874e9a3..21c275fc8ecdecadcc849c65b45f6fe02e0c3d0d 100644 (file)
@@ -10,11 +10,11 @@ import BigFloat
 
 import NumericPrelude hiding ( abs )
 import Algebra.Absolute ( abs )
-import qualified Algebra.Absolute as Absolute
-import qualified Algebra.Algebraic as Algebraic
+import qualified Algebra.Absolute as Absolute ( C )
+import qualified Algebra.Algebraic as Algebraic ( C )
 import Algebra.Algebraic ( root )
-import qualified Algebra.RealField as RealField
-import qualified Algebra.ToInteger as ToInteger
+import qualified Algebra.RealField as RealField ( C )
+import qualified Algebra.ToInteger as ToInteger ( C )
 import qualified Algebra.ToRational as ToRational ( C )
 import Data.Vector.Fixed ( S, Z )
 import qualified Data.Vector.Fixed as V (
@@ -25,11 +25,15 @@ import Data.Vector.Fixed.Boxed ( Vec )
 
 import Linear.Vector ( element_sum )
 
+
+-- | Instances of the 'Normed' class know how to compute their own
+--   p-norms for p=1,2,...,infinity.
+--
 class Normed a where
   norm_p :: (ToInteger.C c, Algebraic.C b, Absolute.C b) => c -> a -> b
   norm_infty :: (RealField.C b) => a -> b
 
-  -- | The "usual" norm. Defaults to the Euclidean norm.
+  -- | The \"usual\" norm. Defaults to the 2-norm.
   norm :: (Algebraic.C b, Absolute.C b) => a -> b
   norm = norm_p (2 :: Integer)