Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,17 @@
(scl 9)
(load "@lib/math.l")
(de cholesky (A)
(let L (mapcar '(() (need (length A) 0)) A)
(for (I . R) A
(for J I
(let S (get R J)
(for K (inc J)
(dec 'S (*/ (get L I K) (get L J K) 1.0)) )
(set (nth L I J)
(if (= I J)
(sqrt S 1.0)
(*/ S 1.0 (get L J J)) ) ) ) ) )
(for R L
(for N R (prin (align 9 (round N 5))))
(prinl) ) ) )

View file

@ -0,0 +1,11 @@
(cholesky
'((25.0 15.0 -5.0) (15.0 18.0 0) (-5.0 0 11.0)) )
(prinl)
(cholesky
(quote
(18.0 22.0 54.0 42.0)
(22.0 70.0 86.0 62.0)
(54.0 86.0 174.0 134.0)
(42.0 62.0 134.0 106.0) ) )