diff options
| author | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2026-04-02 20:27:02 -0500 |
|---|---|---|
| committer | Jacques Comeaux <jacquesrcomeaux@protonmail.com> | 2026-04-02 20:27:02 -0500 |
| commit | 6a35dcbbf1b3859b012e5f8546e8cb353898bde2 (patch) | |
| tree | 2df5a1357e482917db0216583cb8060305d16265 /Data/Matrix/Vec.agda | |
| parent | 29dacb01350879a1f94ca100aafc058298bcb8a1 (diff) | |
Reorganize matrix code
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) |
