Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -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) ) ) )
|
||||
|
|
@ -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) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue