diff options
Diffstat (limited to 'Data/Matrix/Vec.agda')
| -rw-r--r-- | Data/Matrix/Vec.agda | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Data/Matrix/Vec.agda b/Data/Matrix/Vec.agda new file mode 100644 index 0000000..e0312d4 --- /dev/null +++ b/Data/Matrix/Vec.agda @@ -0,0 +1,20 @@ +{-# OPTIONS --without-K --safe #-} + +module Data.Matrix.Vec where + +open import Relation.Binary.PropositionalEquality using (_≡_) +open import Level using (Level) +open import Data.Nat using (ℕ) +open import Data.Vec using (Vec; replicate; zipWith) + +private + variable + a : Level + A : Set a + n m : ℕ + +open Vec + +transpose : Vec (Vec A n) m → Vec (Vec A m) n +transpose [] = replicate _ [] +transpose (row ∷ mat) = zipWith _∷_ row (transpose mat) |
