Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Matrix m n a = Matrix (Vector m (Vector n a))
- toMatrix :: forall m n a. (KnownNat m, KnownNat n) => [[a]] -> Maybe (Matrix m n a)
- fromMatrix :: forall m n a. Matrix m n a -> [[a]]
- transpose :: forall m n a. (KnownNat m, KnownNat n) => Matrix m n a -> Matrix n m a
- outer :: forall m n a b c. (a -> b -> c) -> Vector m a -> Vector n b -> Matrix m n c
- (.*) :: MultiplicativeSemigroup a => Matrix m n a -> Matrix m n a -> Matrix m n a
- sum1 :: Semiring a => Matrix m n a -> Vector n a
- sum2 :: (KnownNat m, KnownNat n, Semiring a) => Matrix m n a -> Vector m a
- matrixDotProduct :: forall m n a. Semiring a => Matrix m n a -> Matrix m n a -> a
- (.*.) :: (KnownNat n, KnownNat k, Semiring a) => Matrix m n a -> Matrix n k a -> Matrix m k a
Documentation
Instances
(KnownNat m, KnownNat n) => Applicative (Matrix m n) Source # | |
Defined in ZkFold.Base.Data.Matrix | |
Functor (Matrix m n) Source # | |
Semialign (Matrix m n) Source # | |
Zip (Matrix m n) Source # | |
(Arbitrary a, KnownNat m, KnownNat n) => Arbitrary (Matrix m n a) Source # | |
Show a => Show (Matrix m n a) Source # | |
Eq a => Eq (Matrix m n a) Source # | |
(Random a, KnownNat m, KnownNat n) => Random (Matrix m n a) Source # | |
fromMatrix :: forall m n a. Matrix m n a -> [[a]] Source #