08-Jan-2022 09:08:40 r8ccs_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test r8ccs(). r8ccs_dif2_test r8ccs_dif2 sets the second difference as an r8ccs matrix; Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 13 The r8ccs 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 r8ccs_get_test r8ccs_get gets an entry of an r8ccs matrix; Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The COLPTR vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROWIND vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The initial r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.537667 0.862173 0 0 2.76944 2 1.83389 0.318765 0 0 -1.34989 3 0 0 -1.30769 0 0 4 -2.25885 0 0 0.342624 0 5 0 0 -0.433592 3.5784 3.03492 r8ccs_get retrieves 10 entries. I J K VALUE 5 5 12 3.034923 3 3 6 -1.307688 1 5 10 2.769437 2 1 2 1.833885 3 3 6 -1.307688 2 5 11 -1.349887 1 5 10 2.769437 5 5 12 3.034923 4 4 8 0.342624 1 1 1 0.537667 r8ccs_ijk_test r8ccs_ijk gets K from (I,J) for an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The COLPTR vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROWIND vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The initial r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.717239 1.03469 0 0 -1.14707 2 1.63024 0.726885 0 0 -1.06887 3 0 0 -0.303441 0 0 4 0.488894 0 0 -0.787283 0 5 0 0 0.293871 0.888396 -0.809499 r8ccs_ijk locates some (I,J) entries. I J K 1 5 10 4 2 -1 5 1 -1 3 2 -1 4 4 8 1 3 -1 3 4 -1 4 4 8 2 4 -1 4 1 3 1 3 -1 5 2 -1 3 2 -1 4 2 -1 3 4 -1 5 5 12 3 1 -1 1 2 4 5 2 -1 5 2 -1 r8ccs_inc_test r8ccs_inc increments entries in an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The COLPTR vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROWIND vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The initial r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.88861 -1.42238 0 0 0.197811 2 -0.764849 0.488194 0 0 1.5877 3 0 0 -0.177375 0 0 4 -1.40227 0 0 1.41931 0 5 0 0 -0.196053 0.291584 -0.804466 r8ccs_inc increments 10 entries at random. I J K NEW_VALUE 1 5 10 21.197811 1 5 10 43.197811 2 2 5 23.488194 5 3 7 23.803947 1 1 1 25.888610 1 1 1 51.888610 5 3 7 50.803947 1 5 10 71.197811 5 5 12 28.195534 2 1 2 29.235151 The final r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 51.8886 -1.42238 0 0 71.1978 2 29.2352 23.4882 0 0 1.5877 3 0 0 -0.177375 0 0 4 -1.40227 0 0 1.41931 0 5 0 0 50.8039 0.291584 28.1955 r8ccs_indicator_test r8ccs_indicator sets up the indicator matrix; Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 12 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 15 2 21 22 0 0 25 3 0 0 33 0 0 4 41 0 0 44 0 5 0 0 53 54 55 r8ccs_kij_test r8ccs_kij gets (I,J) from K in an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The COLPTR vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROWIND vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The initial r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.187331 -0.438966 0 0 0.303521 2 -0.0824944 -1.79468 0 0 -0.600327 3 0 0 0.840376 0 0 4 -1.93302 0 0 0.100093 0 5 0 0 -0.888032 -0.544529 0.489965 r8ccs_KIJ locates some K entries. K I J 9 5 4 9 5 4 6 3 3 2 2 1 3 4 1 11 2 5 2 2 1 10 1 5 7 5 3 12 5 5 1 1 1 6 3 3 2 2 1 12 5 5 1 1 1 10 1 5 10 1 5 11 2 5 2 2 1 5 2 2 r8ccs_mtv_test r8ccs_mtv computes b=A'*x, where A is an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The r8ccs matrix A: Col: 1 2 3 4 5 Row --- 1 -0.272469 0.701541 0 0 0.281984 2 1.09842 -2.05182 0 0 0.0334799 3 0 0 -0.35385 0 0 4 -0.277872 0 0 -1.57706 0 5 0 0 -0.823587 0.507975 -1.33368 x: 1: 1 2: 0 3: 0 4: 0 5: -1 b=A'*x: 1: -0.272469 2: 0.701541 3: 0.823587 4: -0.507975 5: 1.61566 r8ccs_mv_test r8ccs_mv computes b=A*x, where A is an r8ccs matrix; Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The r8ccs matrix A: Col: 1 2 3 4 5 Row --- 1 1.12749 0.0228898 0 0 -1.1564 2 0.350179 -0.261995 0 0 -0.533557 3 0 0 -1.75021 0 0 4 -0.299066 0 0 -0.831367 0 5 0 0 -0.285651 -0.979206 -2.00264 The x: 1: 1 2: 0 3: 0 4: 0 5: -1 b=A*x: 1: 2.28389 2: 0.883737 3: 0 4: -0.299066 5: 2.00264 r8ccs_print_test r8ccs_print prints a r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.964229 -0.0347711 0 0 -0.224771 2 0.52006 -0.798164 0 0 -0.589029 3 0 0 1.01869 0 0 4 -0.0200279 0 0 -0.71453 0 5 0 0 -0.133217 1.35139 -0.293754 r8ccs_print_some_test r8ccs_print_some prints some of an r8ccs matrix. Matrix rows M = 10 Matrix columns N = 10 Nonzeros NZ_NUM = 28 Rows 2-6, Cols 5-8: Col: 5 6 7 8 Row --- 2 0 0 0 0 3 0 0 0 0 4 405 0 0 0 5 505 506 0 0 6 605 606 607 0 r8ccs_random_test r8ccs_random randomizes an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 12 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 -0.847926 1.6555 0 0 -1.332 2 -1.12013 0.307535 0 0 -2.32987 3 0 0 -1.25712 0 0 4 2.526 0 0 -0.176534 0 5 0 0 -0.865468 0.791416 -1.4491 r8ccs_read_test r8ccs_read reads an r8ccs matrix from a file. Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 12 Index base (0/1) = 1 The COL vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROW vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 15 2 21 22 0 0 25 3 0 0 33 0 0 4 41 0 0 44 0 5 0 0 53 54 55 r8ccs_set_test r8ccs_set sets entries in an r8ccs matrix; Matrix rows M = 5 Matrix columns N = 5 Matrix nonzeros NZ_NUM = 12 The COLPTR vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROWIND vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The initial r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0.333511 -0.130285 0 0 -0.848709 2 0.391354 0.183689 0 0 -0.334887 3 0 0 -0.476153 0 0 4 0.451679 0 0 -1.36169 0 5 0 0 0.862022 0.45503 0.552783 r8ccs_set sets 10 entries at random. I J K NEW_VALUE 1 5 10 101.000000 1 1 1 102.000000 5 5 12 103.000000 1 5 10 104.000000 3 3 6 105.000000 3 3 6 106.000000 3 3 6 107.000000 1 2 4 108.000000 5 3 7 109.000000 5 3 7 110.000000 The final r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 102 108 0 0 104 2 0.391354 0.183689 0 0 -0.334887 3 0 0 107 0 0 4 0.451679 0 0 -1.36169 0 5 0 0 110 0.45503 103 r8ccs_to_r8ge_test r8ccs_to_r8ge converts a matrix from r8ccs to r8ge format. Matrix rows M = Matrix columns N = Nonzeros NZ_NUM = The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 15 2 21 22 0 0 25 3 0 0 33 0 0 4 41 0 0 44 0 5 0 0 53 54 55 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 15 2 21 22 0 0 25 3 0 0 33 0 0 4 41 0 0 44 0 5 0 0 53 54 55 r8ccs_write_test r8ccs_write writes an r8ccs matrix to 3 files Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 12 The COL vector: 1: 1 2: 4 3: 6 4: 8 5: 10 6: 13 The ROW vector: 1: 1 2: 2 3: 4 4: 1 5: 2 6: 3 7: 5 8: 4 9: 5 10: 1 11: 2 12: 5 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 15 2 21 22 0 0 25 3 0 0 33 0 0 4 41 0 0 44 0 5 0 0 53 54 55 r8ccs_zeros_test r8ccs_zeros zeros an r8ccs matrix. Matrix rows M = 5 Matrix columns N = 5 Nonzeros NZ_NUM = 12 The r8ccs matrix: Col: 1 2 3 4 5 Row --- 1 0 0 0 0 0 2 0 0 0 0 0 3 0 0 0 0 0 4 0 0 0 0 0 5 0 0 0 0 0 r8ccs_test(): Normal end of execution. 08-Jan-2022 09:08:40