📄 mod2sparse-test-out
字号:
PART 1:Matrix m1: 0: 0 1: 1 2: 2 3 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 910: 10 3811: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 4 34Matrix m2, as read from file. Should be same as m1 above. 0: 0 1: 1 2: 2 3 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 910: 10 3811: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 4 34Test of equality of m1 & m2 (should be 1): 1Matrix m3, copied from m1 above. 0: 0 1: 1 2: 2 3 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 910: 10 3811: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 4 34Test of equality of m1 & m3 (should be 1): 1Matrix m3 again, should now be all zeros. 0: 1: 2: 3: 4: 5: 6: 7: 8: 9:10:11:12:13:14:15:16:17:18:19:20:21:22:23:24:25:26:27:28:29:30:31:32:33:34:Test of equality of m1 & m3 (should be 0): 0PART 2:Transpose of m1. 0: 0 1: 1 2: 2 3: 2 3 4: 4 34 5: 5 6: 6 7: 7 8: 8 9: 910: 1011: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 3435:36:37:38: 1039:Matrix m1 after adding rows 2 and 12 and 3 to 10. 0: 0 1: 1 2: 2 3 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 910: 2 10 12 3811: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 4 34Matrix m1 after further adding column 34 to 0. 0: 0 1: 1 2: 2 3 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 910: 2 10 12 3811: 1112: 1213: 1314: 1415: 1516: 1617: 1718: 1819: 1920: 2021: 2122: 2223: 2324: 2425: 2526: 2627: 2728: 2829: 2930: 3031: 3132: 3233: 3334: 0 4 34PART 3:Matrix s0.0:1: 3 42: 03: 14:Matrix s1.0:1: 3 52:3: 0 1 64:Matrix s2.0: 01: 12:3:4:5: 1 2 36:Maxtrix s1 times unpacked vector ( 1 0 0 1 0 1 0 ).( 0 0 0 1 0 )Sum of s0 and s1.0:1: 4 52: 03: 0 64:Product of s1 and s2.0:1: 1 2 32:3: 0 14:Tried to find (1,2), actually found: (1,2)Above matrix with (1,2) cleared.0:1: 1 32:3: 0 14:Tried to find (1,1), actually found: (1,1)Matrix with (1,1) cleared as well.0:1: 32:3: 0 14:PART 4:Matrix s1.0: 3 51: 1 62: 03: 1 24: 0 25: 6LU decomposition (returned value was 0).L=0: 31: 12: 03: 1 24: 0 2 45:U=0: 01: 1 62: 2 63: 34: 6cols: 0 1 2 3 6 5 4rows: 2 1 3 0 4 5Product of L and U.0: 31: 1 62: 03: 1 24: 0 25:Solution of Ly=x with x from ( 0 1 1 0 1 0 ) according to rows selected. 1 1 1 0 1Returned value from forward_sub was 1Solution of Uz=y. 1 0 0 0 0 0 1Returned value from backward_sub was 1PART 5:Matrix m1:0: 31: 12: 23: 0Matrix m2, copyrows of m1 in order 3,1,2,0 (should be identity)0: 01: 12: 23: 3Matrix m3, copycols of m1 in order 3,1,2,0 (should be identity)0: 01: 12: 23: 3DONE WITH TESTS.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -