halg-matrices-0.6.0.0: Abstraction layer ror various matrix libraries, part of halg computational algebra suite.
Safe HaskellNone
LanguageHaskell2010

Algebra.Matrix.IntMap

Synopsis

Documentation

data IMMatrix a Source #

Sparse matrix represented by a finite map from index to an element.

Instances

Instances details
DecidableZero a => Matrix IMMatrix a Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

basicRowCount :: IMMatrix a -> Size Source #

basicColumnCount :: IMMatrix a -> Size Source #

unsafeFreeze :: PrimMonad m => Mutable IMMatrix (PrimState m) a -> m (IMMatrix a) Source #

unsafeThaw :: PrimMonad m => IMMatrix a -> m (Mutable IMMatrix (PrimState m) a) Source #

basicUnsafeIndexM :: Monad m => IMMatrix a -> Index -> Index -> m a Source #

basicUnsafeGetRowM :: Monad m => IMMatrix a -> Index -> m (Row IMMatrix a) Source #

basicUnsafeGetColumnM :: Monad m => IMMatrix a -> Index -> m (Column IMMatrix a) Source #

basicUnsafeCopy :: PrimMonad m => Mutable IMMatrix (PrimState m) a -> IMMatrix a -> m () Source #

unsafeGenerate :: Size -> Size -> (Index -> Index -> a) -> IMMatrix a Source #

unsafeWrite :: IMMatrix a -> Index -> Index -> a -> IMMatrix a Source #

unsafeFromRows :: [Row IMMatrix a] -> IMMatrix a Source #

unsafeFromColumns :: [Column IMMatrix a] -> IMMatrix a Source #

toRows :: IMMatrix a -> [Row IMMatrix a] Source #

toColumns :: IMMatrix a -> [Column IMMatrix a] Source #

swapRows :: IMMatrix a -> Index -> Index -> IMMatrix a Source #

scaleRow :: IMMatrix a -> Index -> a -> IMMatrix a Source #

unsafeIMapRowM :: Monad m => IMMatrix a -> Index -> (Index -> a -> m a) -> m (IMMatrix a) Source #

unsafeIMapRowM_ :: Monad m => IMMatrix a -> Index -> (Index -> a -> m b) -> m () Source #

unsafeIMapRow :: IMMatrix a -> Index -> (Index -> a -> a) -> IMMatrix a Source #

combineRows :: Index -> a -> Index -> IMMatrix a -> IMMatrix a Source #

gaussReduction :: IMMatrix a -> (IMMatrix a, IMMatrix a, a) Source #

Eq a => Eq (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

(==) :: IMMatrix a -> IMMatrix a -> Bool #

(/=) :: IMMatrix a -> IMMatrix a -> Bool #

Ord a => Ord (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

compare :: IMMatrix a -> IMMatrix a -> Ordering #

(<) :: IMMatrix a -> IMMatrix a -> Bool #

(<=) :: IMMatrix a -> IMMatrix a -> Bool #

(>) :: IMMatrix a -> IMMatrix a -> Bool #

(>=) :: IMMatrix a -> IMMatrix a -> Bool #

max :: IMMatrix a -> IMMatrix a -> IMMatrix a #

min :: IMMatrix a -> IMMatrix a -> IMMatrix a #

(DecidableZero a, Show a) => Show (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

showsPrec :: Int -> IMMatrix a -> ShowS #

show :: IMMatrix a -> String #

showList :: [IMMatrix a] -> ShowS #

(Ring a, DecidableZero a) => Multiplicative (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

(*) :: IMMatrix a -> IMMatrix a -> IMMatrix a #

pow1p :: IMMatrix a -> Natural -> IMMatrix a #

productWith1 :: Foldable1 f => (a0 -> IMMatrix a) -> f a0 -> IMMatrix a #

DecidableZero a => Additive (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

(+) :: IMMatrix a -> IMMatrix a -> IMMatrix a #

sinnum1p :: Natural -> IMMatrix a -> IMMatrix a #

sumWith1 :: Foldable1 f => (a0 -> IMMatrix a) -> f a0 -> IMMatrix a #

NFData a => NFData (IMMatrix a) Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

rnf :: IMMatrix a -> () #

type Mutable IMMatrix Source # 
Instance details

Defined in Algebra.Matrix.IntMap

type Row IMMatrix Source # 
Instance details

Defined in Algebra.Matrix.IntMap

type Column IMMatrix Source # 
Instance details

Defined in Algebra.Matrix.IntMap

data MIMMatrix s a Source #

Mutable version of IMMatrix, but the same.

Instances

Instances details
DecidableZero a => MMatrix MIMMatrix a Source # 
Instance details

Defined in Algebra.Matrix.IntMap

Methods

basicUnsafeNew :: PrimMonad m => Size -> Size -> m (MIMMatrix (PrimState m) a) Source #

basicInitialise :: PrimMonad m => MIMMatrix (PrimState m) a -> m () Source #

basicRowCount :: MIMMatrix s a -> Size Source #

basicColumnCount :: MIMMatrix s a -> Size Source #

unsafeGetRow :: PrimMonad m => Index -> MIMMatrix (PrimState m) a -> m (Row MIMMatrix a) Source #

unsafeGetColumn :: PrimMonad m => Index -> MIMMatrix (PrimState m) a -> m (Column MIMMatrix a) Source #

unsafeFill :: PrimMonad m => Size -> Size -> a -> m (MIMMatrix (PrimState m) a) Source #

unsafeFromRow :: PrimMonad m => Row MIMMatrix a -> m (MIMMatrix (PrimState m) a) Source #

unsafeFromRows :: PrimMonad m => [Row MIMMatrix a] -> m (MIMMatrix (PrimState m) a) Source #

unsafeFromColumn :: PrimMonad m => Column MIMMatrix a -> m (MIMMatrix (PrimState m) a) Source #

unsafeFromColumns :: PrimMonad m => [Column MIMMatrix a] -> m (MIMMatrix (PrimState m) a) Source #

unsafeCopy :: PrimMonad m => MIMMatrix (PrimState m) a -> MIMMatrix (PrimState m) a -> m () Source #

unsafeRead :: PrimMonad m => MIMMatrix (PrimState m) a -> Index -> Index -> m a Source #

unsafeWrite :: PrimMonad m => MIMMatrix (PrimState m) a -> Index -> Index -> a -> m () Source #

basicSet :: PrimMonad m => MIMMatrix (PrimState m) a -> a -> m () Source #

basicUnsafeIMapRowM :: PrimMonad m => MIMMatrix (PrimState m) a -> Index -> (Index -> a -> m a) -> m () Source #

basicUnsafeIMapRow :: PrimMonad m => MIMMatrix (PrimState m) a -> Index -> (Index -> a -> a) -> m () Source #

basicUnsafeSwapRows :: PrimMonad m => MIMMatrix (PrimState m) a -> Index -> Index -> m () Source #

unsafeScaleRow :: (PrimMonad m, Commutative a) => MIMMatrix (PrimState m) a -> Index -> a -> m () Source #

unsafeGenerate :: PrimMonad m => Size -> Size -> (Index -> Index -> a) -> m (MIMMatrix (PrimState m) a) Source #

unsafeGenerateM :: PrimMonad m => Size -> Size -> (Index -> Index -> m a) -> m (MIMMatrix (PrimState m) a) Source #

toRows :: PrimMonad m => MIMMatrix (PrimState m) a -> m [Row MIMMatrix a] Source #

toColumns :: PrimMonad m => MIMMatrix (PrimState m) a -> m [Column MIMMatrix a] Source #

combineRows :: (Semiring a, Commutative a, PrimMonad m) => Index -> a -> Index -> MIMMatrix (PrimState m) a -> m () Source #

type Row MIMMatrix Source # 
Instance details

Defined in Algebra.Matrix.IntMap

type Column MIMMatrix Source # 
Instance details

Defined in Algebra.Matrix.IntMap