Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Vector-based matrix implementation.
Synopsis
- type Mat a = IxUVector (Int, Int) a
- type Col a = Vector a
- mulMatToCol :: (Num e, Unbox e) => Mat e -> Col e -> Col e
- mulMatToColMod :: (Unbox e, Integral e) => e -> Mat e -> Col e -> Col e
- mulMat :: (Num e, Unbox e) => Mat e -> Mat e -> Mat e
- mulMatMod :: (Integral e, Unbox e) => e -> Mat e -> Mat e -> Mat e
- unitMat :: (Unbox e, Num e) => Int -> Mat e
Documentation
mulMatToCol :: (Num e, Unbox e) => Mat e -> Col e -> Col e #
\(O(HW)\) Multiplies HxW matrix to a Hx1 column vector.
mulMatToColMod :: (Unbox e, Integral e) => e -> Mat e -> Col e -> Col e #
\(O(HW)\) Multiplies HxW matrix to a Hx1 column vector, taking the modulus.
mulMat :: (Num e, Unbox e) => Mat e -> Mat e -> Mat e #
\(O(H_1 W_2 K)\) Multiplies H1xK matrix to a KxW2 matrix.
mulMatMod :: (Integral e, Unbox e) => e -> Mat e -> Mat e -> Mat e #
\(O(H_1 W_2 K)\) Multiplies H1xK matrix to a KxW2 matrix, taking the modulus.