Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1 @@
'( (0 1) (2 3) )

View file

@ -0,0 +1,6 @@
(defn identity-matrix [n]
(let [row (conj (repeat (dec n) 0) 1)]
(vec
(for [i (range 1 (inc n))]
(vec
(reduce conj (drop i row ) (take i row)))))))

View file

@ -0,0 +1,2 @@
=> (identity-matrix 5)
[[1 0 0 0 0] [0 1 0 0 0] [0 0 1 0 0] [0 0 0 1 0] [0 0 0 0 1]]

View file

@ -0,0 +1,4 @@
(defn identity-matrix [n]
(take n
(partition n (dec n)
(cycle (conj (repeat (dec n) 0) 1)))))