matrices-0.5.0: native matrix based on vector

Safe HaskellNone
LanguageHaskell2010

Data.Matrix.Symmetric.Generic

Synopsis

Documentation

data SymMatrix v a Source #

Symmetric square matrix

Constructors

SymMatrix !Int !(v a) 
Instances
Vector v a => Matrix SymMatrix v a Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

Eq (v a) => Eq (SymMatrix v a) Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

Methods

(==) :: SymMatrix v a -> SymMatrix v a -> Bool #

(/=) :: SymMatrix v a -> SymMatrix v a -> Bool #

Read (v a) => Read (SymMatrix v a) Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

Show (v a) => Show (SymMatrix v a) Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

Methods

showsPrec :: Int -> SymMatrix v a -> ShowS #

show :: SymMatrix v a -> String #

showList :: [SymMatrix v a] -> ShowS #

Generic (SymMatrix v a) Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

Associated Types

type Rep (SymMatrix v a) :: Type -> Type #

Methods

from :: SymMatrix v a -> Rep (SymMatrix v a) x #

to :: Rep (SymMatrix v a) x -> SymMatrix v a #

type Mutable SymMatrix Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

type Rep (SymMatrix v a) Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic

type Rep (SymMatrix v a) = D1 (MetaData "SymMatrix" "Data.Matrix.Symmetric.Generic" "matrices-0.5.0-FMMu8pFXACi4pkCcGE7sA2" False) (C1 (MetaCons "SymMatrix" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (v a))))

dim :: Matrix m v a => m v a -> (Int, Int) Source #

rows :: Matrix m v a => m v a -> Int Source #

Derived methods

Return the number of rows

cols :: Matrix m v a => m v a -> Int Source #

Return the number of columns

unsafeIndex :: Matrix m v a => m v a -> (Int, Int) -> a Source #

(!) :: Matrix m v a => m v a -> (Int, Int) -> a Source #

Indexing

flatten :: Matrix m v a => m v a -> v a Source #

Default algorithm is O((m*n) * O(unsafeIndex)).

unsafeFromVector :: Matrix m v a => (Int, Int) -> v a -> m v a Source #

fromVector :: Matrix m v a => (Int, Int) -> v a -> m v a Source #

takeRow :: Matrix m v a => m v a -> Int -> v a Source #

Extract a row.

thaw :: (Matrix m v a, PrimMonad s) => m v a -> s (Mutable m (Mutable v) (PrimState s) a) Source #

unsafeThaw :: (Matrix m v a, PrimMonad s) => m v a -> s (Mutable m (Mutable v) (PrimState s) a) Source #

freeze :: (Matrix m v a, PrimMonad s) => Mutable m (Mutable v) (PrimState s) a -> s (m v a) Source #

unsafeFreeze :: (Matrix m v a, PrimMonad s) => Mutable m (Mutable v) (PrimState s) a -> s (m v a) Source #

create :: Matrix m v a => (forall s. ST s (Mutable m (Mutable v) s a)) -> m v a Source #

map :: (Vector v a, Vector v b) => (a -> b) -> SymMatrix v a -> SymMatrix v b Source #

imap :: (Vector v a, Vector v b) => ((Int, Int) -> a -> b) -> SymMatrix v a -> SymMatrix v b Source #

Upper triangular imap, i.e., i <= j

zip :: (Vector v a, Vector v b, Vector v (a, b)) => SymMatrix v a -> SymMatrix v b -> SymMatrix v (a, b) Source #

zipWith :: (Vector v a, Vector v b, Vector v c) => (a -> b -> c) -> SymMatrix v a -> SymMatrix v b -> SymMatrix v c Source #