Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SymMatrix v a = SymMatrix !Int !(v a)
- dim :: Matrix m v a => m v a -> (Int, Int)
- rows :: Matrix m v a => m v a -> Int
- cols :: Matrix m v a => m v a -> Int
- unsafeIndex :: Matrix m v a => m v a -> (Int, Int) -> 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 :: Matrix m v a => (forall s. ST s (Mutable m (Mutable v) s a)) -> m v a
- map :: (Vector v a, Vector v b) => (a -> b) -> SymMatrix v a -> SymMatrix v b
- imap :: (Vector v a, Vector v b) => ((Int, Int) -> a -> b) -> SymMatrix v a -> SymMatrix v b
- zip :: (Vector v a, Vector v b, Vector v (a, b)) => SymMatrix v a -> SymMatrix v b -> SymMatrix v (a, b)
- zipWith :: (Vector v a, Vector v b, Vector v c) => (a -> b -> c) -> SymMatrix v a -> SymMatrix v b -> SymMatrix v c
Documentation
Symmetric square matrix
Instances
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 #
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