06 April 2020 10:32:07 AM R8ROW_TEST C++ version Test the R8ROW library. R8ROW_COMPARE_TEST R8ROW_COMPARE compares rows of an R8ROW, returning -1, 0 or +1 for comparison. Matrix A: Col: 0 1 2 3 4 Row 0: 2 0 1 2 0 1: 0 1 2 0 1 2: 1 2 0 1 2 3: 2 0 1 2 0 4: 0 1 2 0 1 5: 1 2 0 1 2 C(I,J) = Row I compare Row J: Col: 0 1 2 3 4 5 Row 0: 0 1 1 0 1 1 1: -1 0 -1 -1 0 -1 2: -1 1 0 -1 1 0 3: 0 1 1 0 1 1 4: -1 0 -1 -1 0 -1 5: -1 1 0 -1 1 0 R8ROW_INDICATOR_NEW_TEST R8ROW_INDICATOR_NEW returns the indicator matrix as an R8ROW. The indicator matrix: Col: 0 1 2 3 Row 0: 11 12 13 14 1: 21 22 23 24 2: 31 32 33 34 3: 41 42 43 44 4: 51 52 53 54 R8ROW_MAX_TEST R8ROW_MAX computes maximums of an R8ROW; The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 The row maximums: 0: 4 1: 8 2: 12 R8ROW_MEAN_TEST R8ROW_MEAN computes means of an R8ROW. The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 Row means: 0: 2.5 1: 6.5 2: 10.5 R8ROW_MIN_TEST R8ROW_MIN computes minimums of an R8ROW. The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 The row minimums: 0: 1 1: 5 2: 9 R8ROW_PRINT_TEST R8ROW_PRINT prints an R8ROW. The R8MAT: Col: 0 1 2 3 Row 0: 11 12 13 14 1: 21 22 23 24 2: 31 32 33 34 3: 41 42 43 44 4: 51 52 53 54 5: 61 62 63 64 R8ROW_PRINT_SOME_TEST R8ROW_PRINT_SOME prints some of an R8ROW. The R8MAT, rows 2:4, cols 1:2: Col: 0 1 Row 1: 21 22 2: 31 32 3: 41 42 R8ROW_RUNNING_AVERAGE_TEST R8ROW_RUNNING_AVERAGE returns M sets of running averages of an MxN R8ROW. Random R8ROW: Col: 0 1 2 3 4 Row 0: -1.72373 -4.00822 -4.07409 -4.97242 7.88645 1: 9.34476 -1.13633 1.74308 8.46256 7.61271 2: 7.44264 -3.35065 1.01959 0.261285 -3.15344 3: 3.42543 -4.34257 6.3201 -3.58183 -4.88731 4: 1.22961 4.50949 6.9593 -4.79575 -1.09546 Col: 5 6 7 8 9 Row 0: 8.68726 5.381 3.96875 3.61549 5.71707 1: -3.29504 3.42494 -2.16568 0.5054 -3.2344 2: 0.27443 7.91824 6.42238 4.25807 -0.510063 3: 7.34331 1.80691 0.954827 0.422931 7.37504 4: -0.993016 8.67966 -2.22029 -1.80605 7.3699 Running averages: Col: 0 1 2 3 4 Row 0: 0 -1.72373 -2.86597 -3.26868 -3.69462 1: 0 9.34476 4.10422 3.31717 4.60352 2: 0 7.44264 2.046 1.70386 1.34322 3: 0 3.42543 -0.458567 1.80099 0.455285 4: 0 1.22961 2.86955 4.2328 1.97566 Col: 5 6 7 8 9 Row 0: -1.3784 0.299208 1.02518 1.39312 1.64005 1: 5.20536 3.78862 3.73667 2.99888 2.72182 2: 0.443886 0.415643 1.48744 2.10431 2.34362 3: -0.613235 0.712856 0.869149 0.879859 0.829089 4: 1.36144 0.96903 2.07055 1.53419 1.16306 Col: 10 Row 0: 2.04776 1: 2.1262 2: 2.05825 3: 1.48368 4: 1.78374 R8ROW_RUNNING_SUM_TEST R8ROW_RUNNING_SUM returns the M running sums of an R8ROW. Random R8ROW: Col: 0 1 2 3 4 Row 0: -1.72373 -4.00822 -4.07409 -4.97242 7.88645 1: 9.34476 -1.13633 1.74308 8.46256 7.61271 2: 7.44264 -3.35065 1.01959 0.261285 -3.15344 3: 3.42543 -4.34257 6.3201 -3.58183 -4.88731 4: 1.22961 4.50949 6.9593 -4.79575 -1.09546 Col: 5 6 7 8 9 Row 0: 8.68726 5.381 3.96875 3.61549 5.71707 1: -3.29504 3.42494 -2.16568 0.5054 -3.2344 2: 0.27443 7.91824 6.42238 4.25807 -0.510063 3: 7.34331 1.80691 0.954827 0.422931 7.37504 4: -0.993016 8.67966 -2.22029 -1.80605 7.3699 Running sums: Col: 0 1 2 3 4 Row 0: 0 -1.72373 -5.73194 -9.80604 -14.7785 1: 0 9.34476 8.20843 9.95151 18.4141 2: 0 7.44264 4.09199 5.11158 5.37287 3: 0 3.42543 -0.917133 5.40297 1.82114 4: 0 1.22961 5.73909 12.6984 7.90265 Col: 5 6 7 8 9 Row 0: -6.89201 1.79525 7.17625 11.145 14.7605 1: 26.0268 22.7317 26.1567 23.991 24.4964 2: 2.21943 2.49386 10.4121 16.8345 21.0925 3: -3.06617 4.27714 6.08404 7.03887 7.4618 4: 6.80719 5.81418 14.4938 12.2735 10.4675 Col: 10 Row 0: 20.4776 1: 21.262 2: 20.5825 3: 14.8368 4: 17.8374 R8ROW_SORT_HEAP_A_TEST R8ROW_SORT_HEAP_A ascending heap sorts of an R8ROW. The unsorted matrix: Col: 0 1 2 Row 0: 2 6 10 1: 4 8 12 2: 1 5 9 3: 3 7 11 The sorted matrix: Col: 0 1 2 Row 0: 1 5 9 1: 2 6 10 2: 3 7 11 3: 4 8 12 R8ROW_SUM_TEST R8ROW_SUM computes sums of an R8ROW. The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 The row sums: 0: 10 1: 26 2: 42 R8ROW_SWAP_TEST R8ROW_SWAP swaps two rows of an R8ROW. The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 Swap rows 0 and 2 The modified matrix: Col: 0 1 2 3 Row 0: 9 10 11 12 1: 5 6 7 8 2: 1 2 3 4 R8ROW_TO_R8VEC_TEST R8ROW_TO_R8VEC converts an R8ROW into a vector. The array of rows: Col: 0 1 2 3 Row 0: 0 1 2 3 1: 10 11 12 13 2: 20 21 22 23 The resulting vector of rows: 0: 0 1: 10 2: 20 3: 1 4: 11 5: 21 6: 2 7: 12 8: 22 9: 3 10: 13 11: 23 R8ROW_TRANSPOSE_PRINT_TEST R8ROW_TRANSPOSE_PRINT prints an R8ROW, transposed. Matrix row order M = 7 Matrix column order N = 12 The transposed matrix A: Row: 0 1 2 3 4 Col 0: 101 201 301 401 501 1: 102 202 302 402 502 2: 103 203 303 403 503 3: 104 204 304 404 504 4: 105 205 305 405 505 5: 106 206 306 406 506 6: 107 207 307 407 507 7: 108 208 308 408 508 8: 109 209 309 409 509 9: 110 210 310 410 510 10: 111 211 311 411 511 11: 112 212 312 412 512 Row: 5 6 Col 0: 601 701 1: 602 702 2: 603 703 3: 604 704 4: 605 705 5: 606 706 6: 607 707 7: 608 708 8: 609 709 9: 610 710 10: 611 711 11: 612 712 R8ROW_TRANSPOSE_PRINT_SOME_TEST R8ROW_TRANSPOSE_PRINT_SOME prints some of an R8ROW, transposed. Matrix row order M = 7 Matrix column order N = 12 Rows 3:5, Cols 4:8: Row: 2 3 4 Col 3: 304 404 504 4: 305 405 505 5: 306 406 506 6: 307 407 507 7: 308 408 508 R8ROW_UNIFORM_AB_NEW_TEST R8ROW_UNIFORM_AB_NEW returns a random R8ROW in [A,B]. The random R8MAT: Col: 0 1 2 3 Row 0: 3.74735 2.52895 2.49382 2.01471 1: 9.65054 4.06062 5.59631 9.18003 2: 8.63607 2.87965 5.21045 4.80602 3: 6.49356 2.35063 8.03739 2.75636 4: 5.32246 7.07173 8.3783 2.10894 R8ROW_VARIANCE_TEST R8ROW_VARIANCE computes variances of an R8ROW. The original matrix: Col: 0 1 2 3 Row 0: 1 2 3 4 1: 5 6 7 8 2: 9 10 11 12 Row variances: 1 1.66667 2 1.66667 3 1.66667 R8VEC_PRINT_TEST R8VEC_PRINT prints an R8VEC. The R8VEC: 0: 123.456 1: 5e-06 2: -1e+06 3: 3.14159 R8ROW_TEST Normal end of execution. 06 April 2020 10:32:07 AM