28-Jan-2024 21:34:35 r8st_test(): MATLAB version: Test r8st(). r8st_cg_test(): r8st_cg() applies CG to an r8st matrix. Number of variables N = 10 Norm of residual |Ax-b| = 3.90319e-15 Norm of error |x1-x2| = 1.37803e-15 r8st_diagonal_test(): r8st_diagonal() rearranges an r8st matrix so that the diagonal is listed first. Matrix order M = 6 Matrix order N = 6 Matrix nonzeros NZ_NUM = 20 Before rearrangement: K ROW(K) COL(K) A(K) 1 1 5 15 2 3 6 36 3 4 2 42 4 6 2 62 5 5 3 53 6 2 4 24 7 6 4 64 8 3 5 35 9 1 1 11 10 2 6 26 11 4 4 44 12 6 6 66 13 5 5 55 14 4 1 41 15 4 6 46 16 3 3 33 17 6 1 61 18 2 2 22 19 3 1 31 20 4 3 43 After rearrangement: K ROW(K) COL(K) A(K) 1 1 1 11 2 2 2 22 3 3 3 33 4 4 4 44 5 5 5 55 6 6 6 66 7 6 4 64 8 3 5 35 9 1 5 15 10 2 6 26 11 6 2 62 12 2 4 24 13 5 3 53 14 4 1 41 15 4 6 46 16 4 2 42 17 6 1 61 18 3 6 36 19 3 1 31 20 4 3 43 r8st_dif2_test(): r8st_dif2() sets an r8st matrix to the second difference. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 r8st_ij_to_k_test(): r8st_ij_to_k() returns the r8st index of (I,J). Matrix rows M = 7 Matrix columns N = 5 Matrix nonzeros = 10 I J K 1 1 -1 1 2 1 1 3 -1 1 4 -1 1 5 2 2 1 3 2 2 -1 2 3 -1 2 4 -1 2 5 4 3 1 -1 3 2 -1 3 3 -1 3 4 -1 3 5 -1 4 1 5 4 2 6 4 3 7 4 4 -1 4 5 -1 5 1 -1 5 2 -1 5 3 -1 5 4 8 5 5 -1 6 1 -1 6 2 -1 6 3 -1 6 4 9 6 5 -1 7 1 10 7 2 -1 7 3 -1 7 4 -1 7 5 -1 r8st_indicator_test(): r8st_indicator() sets an r8st matrix to the indicator matrix. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 0 2 0 22 0 24 0 3 0 32 33 0 35 4 41 0 0 44 45 5 51 0 53 0 55 r8st_jac_sl_test(): r8st_jac_sl() uses Jacobi iteration to solve a linear system with an r8st matrix. Matrix order M = 10 Matrix order N = 10 Matrix nonzeros NZ_NUM = 28 Iterations per call = 25 Matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 6 0 0 0 0 -1 Col: 6 7 8 9 10 Row --- 5 -1 0 0 0 0 6 2 -1 0 0 0 7 -1 2 -1 0 0 8 0 -1 2 -1 0 9 0 0 -1 2 -1 10 0 0 0 -1 2 Solution x: x = 1 2 3 4 5 6 7 8 9 10 Right hand side b: b = 0 0 0 0 0 0 0 0 0 11 Initial solution estimate x: x = 0 0 0 0 0 0 0 0 0 0 Current solution estimate: 1: 0.315171 2: 0.727797 3: 1.14042 4: 1.82758 5: 2.51474 6: 3.59047 7: 4.6662 8: 6.1282 9: 7.5902 10: 9.2951 Current solution estimate: 1: 0.757545 2: 1.51509 3: 2.34936 4: 3.18363 5: 4.14729 6: 5.11094 7: 6.21581 8: 7.32068 9: 8.53366 10: 9.74665 Current solution estimate: 1: 0.910021 2: 1.83432 3: 2.75863 4: 3.72124 5: 4.68386 6: 5.69666 7: 6.70946 8: 7.76839 9: 8.82731 10: 9.91366 r8st_mtv_test(): r8st_mtv() computes b=A'*x, where A is an r8st matrix. Matrix order M = 5 Matrix order N = 4 Matrix nonzeros NZ_NUM = 11 x: 1: 1 2: 2 3: 3 4: 4 5: 5 b=A'*x: 1: 0 2: 0 3: 0 4: 0 r8st_mv_test(): r8st_mv() computes b=A*x, where A is an r8st matrix. Matrix order M = 5 Matrix order N = 4 Matrix nonzeros NZ_NUM = 11 x: 1: 1 2: 2 3: 3 4: 4 b=A*x: 1: 0 2: 0 3: 0 4: 5 5: -4 r8st_print_test(): r8st_print() prints an r8st matrix. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 r8st_print_some_test(): r8st_print_some() prints some of an r8st matrix. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 Rows 2:4, Cols 3:5: Col: 3 4 5 Row --- 2 -1 0 0 3 2 -1 0 4 -1 2 -1 r8st_random_test(): r8st_random() randomizes an r8st matrix. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 0.157613 0.141886 0 0 0 2 0 0.970593 0 0.421761 0 3 0 0.915736 0.957167 0 0.792207 4 0.959492 0 0 0.485376 0.655741 5 0.0357117 0 0.849129 0 0.80028 r8st_read_test(): r8st_read_size() reads the size of an r8st matrix. r8st_read() reads the r8st matrix from a file. Matrix order M = 100 Matrix order N = 100 Matrix nonzeros NZ_NUM = 298 Initial 10x10 block of recovered r8st matrix: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 6 0 0 0 0 -1 Col: 6 7 8 9 10 Row --- 5 -1 0 0 0 0 6 2 -1 0 0 0 7 -1 2 -1 0 0 8 0 -1 2 -1 0 9 0 0 -1 2 -1 10 0 0 0 -1 2 r8st_res_test(): r8st_res() computes r=b-A*x, where A is an r8st matrix. Matrix order M = 5 Matrix order N = 4 Matrix nonzeros NZ_NUM = 11 x: 1: 1 2: 2 3: 3 4: 4 r=b-A*x: 1: 0 2: 0 3: 0 4: 0 5: 0 r8st_to_r8ge_test(): r8st_to_r8ge() converts an r8st matrix to R8GE format. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 R8GE matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 r8st_to_r8ncf_test(): r8st_to_r8ncf() converts an r8st matrix to R8NCF format. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 R8NCF matrix A: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 r8st_write_test(): r8st_write() writes an r8st matrix to a file. Matrix order M = 100 Matrix order N = 100 Matrix nonzeros NZ_NUM = 298 Initial 10x10 block of r8st matrix: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 0 -1 2 -1 5 0 0 0 -1 2 6 0 0 0 0 -1 Col: 6 7 8 9 10 Row --- 5 -1 0 0 0 0 6 2 -1 0 0 0 7 -1 2 -1 0 0 8 0 -1 2 -1 0 9 0 0 -1 2 -1 10 0 0 0 -1 2 Matrix data written to "r8st_matrix.txt" . r8st_zeros_test(): r8st_zeros() sets an r8st matrix to the zero matrix. Matrix order M = 5 Matrix order N = 5 Matrix nonzeros NZ_NUM = 13 r8st matrix A: Col: 1 2 3 4 5 Row --- r8st_test(): Normal end of execution. 28-Jan-2024 21:34:36