Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- e :: forall n a. (KnownNat n, HasIdentity a) => Identity n a
- type Identity n a = Matrix n n a
- class HasIdentity a where
Documentation
e :: forall n a. (KnownNat n, HasIdentity a) => Identity n a Source #
Polymirphic identity matrix
Identity matrix can udjust to other matrix with known size. If size is unknown, just set it yourself
>>>
e :: Identity 4 Int
[1,0,0,0] [0,1,0,0] [0,0,1,0] [0,0,0,1]>>>
e ~+~ [matrix| 1 2; 3 4 |]
[2,2] [3,5]