Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Matrix.Symmetric.Generic
Synopsis
- data SymMatrix (v :: Type -> Type) a = SymMatrix !Int !(v a)
- dim :: Matrix m v a => m v a -> (Int, Int)
- rows :: forall m (v :: Type -> Type) a. Matrix m v a => m v a -> Int
- cols :: forall m (v :: Type -> Type) a. Matrix m v a => m v a -> Int
- unsafeIndex :: Matrix m v a => m v a -> (Int, Int) -> a
- (!) :: forall m (v :: Type -> Type) a. Matrix m v a => m v a -> (Int, Int) -> a
- flatten :: Matrix m v a => m v a -> v a
- unsafeFromVector :: Matrix m v a => (Int, Int) -> v a -> m v a
- fromVector :: Matrix m v a => (Int, Int) -> v a -> m v a
- takeRow :: Matrix m v a => m v a -> Int -> v a
- thaw :: (Matrix m v a, PrimMonad s) => m v a -> s (Mutable m (Mutable v) (PrimState s) a)
- unsafeThaw :: (Matrix m v a, PrimMonad s) => m v a -> s (Mutable m (Mutable v) (PrimState s) a)
- freeze :: (Matrix m v a, PrimMonad s) => Mutable m (Mutable v) (PrimState s) a -> s (m v a)
- unsafeFreeze :: (Matrix m v a, PrimMonad s) => Mutable m (Mutable v) (PrimState s) a -> s (m v a)
- create :: forall m (v :: Type -> Type) a. Matrix m v a => (forall s. ST s (Mutable m (Mutable v) s a)) -> m v a
- map :: forall (v :: Type -> Type) a b. (Vector v a, Vector v b) => (a -> b) -> SymMatrix v a -> SymMatrix v b
- imap :: forall (v :: Type -> Type) a b. (Vector v a, Vector v b) => ((Int, Int) -> a -> b) -> SymMatrix v a -> SymMatrix v b
- zip :: forall (v :: Type -> Type) a b. (Vector v a, Vector v b, Vector v (a, b)) => SymMatrix v a -> SymMatrix v b -> SymMatrix v (a, b)
- zipWith :: forall (v :: Type -> Type) a b c. (Vector v a, Vector v b, Vector v c) => (a -> b -> c) -> SymMatrix v a -> SymMatrix v b -> SymMatrix v c
Documentation
data SymMatrix (v :: Type -> Type) a Source #
Symmetric square matrix
Instances
rows :: forall m (v :: Type -> Type) a. Matrix m v a => m v a -> Int Source #
Derived methods
Return the number of rows
cols :: forall m (v :: Type -> Type) a. Matrix m v a => m v a -> Int Source #
Return the number of columns
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 :: forall m (v :: Type -> Type) a. Matrix m v a => (forall s. ST s (Mutable m (Mutable v) s a)) -> m v a Source #
map :: forall (v :: Type -> Type) a b. (Vector v a, Vector v b) => (a -> b) -> SymMatrix v a -> SymMatrix v b Source #
imap :: forall (v :: Type -> Type) a b. (Vector v a, Vector v b) => ((Int, Int) -> a -> b) -> SymMatrix v a -> SymMatrix v b Source #
Upper triangular imap, i.e., i <= j