@@ -738,22 +738,25 @@ end
738
738
check "QR decomposition" :
739
739
mtx-is-orthonormal( matrix-q( index-matrix( 50 , 1 ))) is true
740
740
741
- qr = mtx-qr-decomposition( [ matrix( 3 ,3 ) :
742
- 12 , -51 , 4 ,
743
- 6 , 167 , -68 ,
744
- -4 , 24 , -41 ] )
745
- qr. Q is [ matrix( 3 ,3 ) :
746
- 6/7 , -69/175 , -58/175 ,
747
- 3/7 , 158/175 , 6/175 ,
748
- -2/7 , 6/35 , -33/35 ]
749
- qr. R is [ matrix( 3 ,3 ) :
750
- 14 , 21 , -14 ,
751
- 0 , 175 , -70 ,
752
- 0 , 0 , 35 ]
753
-
754
- # A particularly tricky test case used to demonstrate loss of orthogonality
755
- # QR has to generate a better Q than Gram-Schmidt alone (which fails this test)
756
- mtx-is-orthonormal( matrix-q( [ matrix( 2 ,2 ) : 0.70000 , 0.70711 , 0.70001 , 0.70711 ] )) is true
741
+ ### NOTE(Ben): These next few tests run *really excruciatingly slowly* on recent node versions,
742
+ ### but do pass almost instantly in a browser! Commenting them out for performance, for now...
743
+ # qr = mtx-qr-decomposition([matrix(3,3):
744
+ # 12, -51, 4,
745
+ # 6, 167, -68,
746
+ # -4, 24, -41])
747
+ # qr.Q is [matrix(3,3):
748
+ # 6/7, -69/175, -58/175,
749
+ # 3/7, 158/175, 6/175,
750
+ # -2/7, 6/35, -33/35]
751
+ # qr.R is [matrix(3,3):
752
+ # 14, 21, -14,
753
+ # 0, 175, -70,
754
+ # 0, 0, 35]
755
+
756
+ # # A particularly tricky test case used to demonstrate loss of orthogonality
757
+ # # QR has to generate a better Q than Gram-Schmidt alone (which fails this test)
758
+ # mtx-is-orthonormal(matrix-q([matrix(2,2): 0.70000, 0.70711, 0.70001, 0.70711])) is true
759
+ ### END NOTE
757
760
758
761
# # Fuzz test the heck out of it: 100 matrices, random shape, random entries, sometimes rank-deficient
759
762
# for each(_ from range(0, 100)):
0 commit comments