diff options
Diffstat (limited to 'packages/base/src/Data/Packed/Internal/Numeric.hs')
-rw-r--r-- | packages/base/src/Data/Packed/Internal/Numeric.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/base/src/Data/Packed/Internal/Numeric.hs b/packages/base/src/Data/Packed/Internal/Numeric.hs index 81a8083..3528e96 100644 --- a/packages/base/src/Data/Packed/Internal/Numeric.hs +++ b/packages/base/src/Data/Packed/Internal/Numeric.hs | |||
@@ -20,6 +20,7 @@ module Data.Packed.Internal.Numeric ( | |||
20 | ident, diag, ctrans, | 20 | ident, diag, ctrans, |
21 | -- * Generic operations | 21 | -- * Generic operations |
22 | Container(..), | 22 | Container(..), |
23 | Transposable(..), Linear(..), Testable(..), | ||
23 | -- * Matrix product and related functions | 24 | -- * Matrix product and related functions |
24 | Product(..), udot, | 25 | Product(..), udot, |
25 | mXm,mXv,vXm, | 26 | mXm,mXv,vXm, |
@@ -605,3 +606,25 @@ condV f a b l e t = f a' b' l' e' t' | |||
605 | where | 606 | where |
606 | [a', b', l', e', t'] = conformVs [a,b,l,e,t] | 607 | [a', b', l', e', t'] = conformVs [a,b,l,e,t] |
607 | 608 | ||
609 | -------------------------------------------------------------------------------- | ||
610 | |||
611 | class Transposable t | ||
612 | where | ||
613 | tr :: t -> t | ||
614 | |||
615 | |||
616 | class Linear t v | ||
617 | where | ||
618 | scalarL :: t -> v | ||
619 | addL :: v -> v -> v | ||
620 | scaleL :: t -> v -> v | ||
621 | |||
622 | |||
623 | class Testable t | ||
624 | where | ||
625 | checkT :: t -> (Bool, IO()) | ||
626 | ioCheckT :: t -> IO (Bool, IO()) | ||
627 | ioCheckT = return . checkT | ||
628 | |||
629 | -------------------------------------------------------------------------------- | ||
630 | |||