14 September 2021 10:27:48.613 AM R8ROW_TEST FORTRAN90 version Test the R8ROW library. I4_LOG_10_TEST I4_LOG_10: whole part of log base 10, X, I4_LOG_10 0 0 1 0 2 0 3 0 9 0 10 1 11 1 99 1 101 2 -1 0 -2 0 -3 0 -9 0 I4MAT_PRINT_TEST I4MAT_PRINT prints an I4MAT. The matrix: Col 1 2 3 Row 1: 11 12 13 2: 21 22 23 3: 31 32 33 4: 41 42 43 5: 51 52 53 I4MAT_PRINT_SOME_TEST I4MAT_PRINT_SOME prints some of an I4MAT. The I4MAT, rows 2:4, cols 1:2: Col 1 2 Row 2: 21 22 3: 31 32 4: 41 42 I4VEC_PRINT_TEST I4VEC_PRINT prints an I4VEC The I4VEC: 1: 91 2: 92 3: 93 4: 94 R8ROW_COMPARE_TEST R8ROW_COMPARE compares rows of an R8ROW, returning -1, 0 or +1 for comparison. Matrix A: Col 1 2 3 4 5 Row 1: 2. 0. 1. 2. 0. 2: 0. 1. 2. 0. 1. 3: 1. 2. 0. 1. 2. 4: 2. 0. 1. 2. 0. 5: 0. 1. 2. 0. 1. 6: 1. 2. 0. 1. 2. C(I,J) = Row I compare Row J: Col 1 2 3 4 5 6 Row 1: 0 1 1 0 1 1 2: -1 0 -1 -1 0 -1 3: -1 1 0 -1 1 0 4: 0 1 1 0 1 1 5: -1 0 -1 -1 0 -1 6: -1 1 0 -1 1 0 R8ROW_INDICATOR_TEST R8ROW_INDICATOR returns an R8ROW indicator matrix. The indicator matrix: Col 1 2 3 4 Row 1: 11. 12. 13. 14. 2: 21. 22. 23. 24. 3: 31. 32. 33. 34. 4: 41. 42. 43. 44. 5: 51. 52. 53. 54. R8ROW_MAX_TEST R8ROW_MAX computes row maximums of an R8ROW. The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. The row maximums: 1: 4.0000000 2: 8.0000000 3: 12.000000 R8ROW_MEAN_TEST R8ROW_MEAN computes row means of an R8ROW. The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. The row means: 1: 2.5000000 2: 6.5000000 3: 10.500000 R8ROW_MIN_TEST R8ROW_MIN computes row minimums of an R8ROW. The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. The row minimums: 1: 1.0000000 2: 5.0000000 3: 9.0000000 R8ROW_PART_QUICK_A_TEST R8ROW_PART_QUICK_A partitions an R8ROW matrix. The matrix: Col 1 2 Row 1: 2. 4. 2: 8. 8. 3: 6. 2. 4: 0. 2. 5: 10. 6. 6: 10. 0. 7: 0. 6. 8: 5. 8. L = 2 R = 4 The partitioned matrix: Col 1 2 Row 1: 0. 6. 2: 0. 2. 3: 2. 4. 4: 10. 6. 5: 10. 0. 6: 6. 2. 7: 5. 8. 8: 8. 8. R8ROW_PRINT_TEST R8ROW_PRINT prints an R8ROW. The R8ROW: Col 1 2 3 4 Row 1: 11. 12. 13. 14. 2: 21. 22. 23. 24. 3: 31. 32. 33. 34. 4: 41. 42. 43. 44. 5: 51. 52. 53. 54. 6: 61. 62. 63. 64. R8ROW_PRINT_SOME_TEST R8ROW_PRINT_SOME prints some of an R8ROW. The R8ROW, rows 2:4, cols 1:2: Col 1 2 Row 2: 21. 22. 3: 31. 32. 4: 41. 42. R8ROW_RUNNING_AVERAGE_TEST R8ROW_RUNNING_AVERAGE returns M sets of running averages of an MxN R8ROW. Random R8ROW: Col 1 2 3 4 5 Row 1: 9.09034 2.07353 -2.14690 5.89443 -2.76595 2: 2.28694 0.270784 2.50059 -1.56643 -0.800840 3: -2.20718 -4.09425 -2.96381 2.21198 4.24029 4: 4.85538 -1.20330 -0.390913 5.44193 5.49115 5: 3.81890 -4.50573 5.62719 5.07012 0.376595 Col 6 7 8 9 10 Row 1: -1.29547 6.30853 5.71282 -0.560027 -2.27851 2: 1.67119 -1.09428 2.13664 -0.132446 6.83926 3: 0.435614 -1.04451 0.511628 4.34118 7.98893 4: -3.18177 -1.07658 -1.34035 3.83061 -2.94513 5: 9.37904 8.36918 8.82367 9.03647 -1.36246 Running averages: Col 1 2 3 4 5 Row 1: 0. 9.09034 5.58193 3.00566 3.72785 2: 0. 2.28694 1.27886 1.68610 0.872969 3: 0. -2.20718 -3.15071 -3.08841 -1.76331 4: 0. 4.85538 1.82604 1.08706 2.17577 5: 0. 3.81890 -0.343416 1.64679 2.50262 Col 6 7 8 9 10 Row 1: 2.42909 1.80833 2.45122 2.85892 2.47903 2: 0.538207 0.727037 0.466849 0.675573 0.585793 3: -0.562592 -0.396224 -0.488836 -0.363778 0.158995 4: 2.83885 1.83541 1.41941 1.07444 1.38068 5: 2.07741 3.29435 4.01933 4.61987 5.11060 Col 11 Row 1: 2.00328 2: 1.21114 3: 0.941988 4: 0.948102 5: 4.46330 R8ROW_RUNNING_SUM_TEST R8ROW_RUNNING_SUM returns the M running sums of an R8ROW. Random R8ROW: Col 1 2 3 4 5 Row 1: 6.42347 7.29349 5.37307 -1.13070 5.49270 2: -3.53253 6.24893 6.09544 6.59807 7.42847 3: 0.468285 3.54293 2.70081 4.86659 -2.09899 4: -4.98817 6.02585 -1.58430 3.51979 7.83171 5: -0.870849 5.69293 -3.40677 9.22434 -3.31027 Col 6 7 8 9 10 Row 1: 8.18778 4.25695 -2.82437 4.74731 0.744824 2: 0.635891 9.09100 0.223897 -0.991940 9.16386 3: 4.97586 9.12633 -1.81169 7.82780 6.04876 4: 1.95086 -4.48284 3.08970 0.543679E-01 8.59823 5: 5.38272 9.62657 9.01642 1.84819 -0.176456 Running sums: Col 1 2 3 4 5 Row 1: 0. 6.42347 13.7170 19.0900 17.9593 2: 0. -3.53253 2.71639 8.81183 15.4099 3: 0. 0.468285 4.01122 6.71203 11.5786 4: 0. -4.98817 1.03767 -0.546627 2.97316 5: 0. -0.870849 4.82208 1.41531 10.6397 Col 6 7 8 9 10 Row 1: 23.4520 31.6398 35.8968 33.0724 37.8197 2: 22.8384 23.4743 32.5653 32.7892 31.7972 3: 9.47963 14.4555 23.5818 21.7701 29.5979 4: 10.8049 12.7557 8.27289 11.3626 11.4170 5: 7.32939 12.7121 22.3387 31.3551 33.2033 Col 11 Row 1: 38.5645 2: 40.9611 3: 35.6467 4: 20.0152 5: 33.0268 R8ROW_SORT_HEAP_A_TEST R8ROW_SORT_HEAP_A ascending heap sorts of an R8ROW. The unsorted matrix: Col 1 2 3 Row 1: 2. 6. 10. 2: 4. 8. 12. 3: 1. 5. 9. 4: 3. 7. 11. The sorted matrix: Col 1 2 3 Row 1: 1. 5. 9. 2: 2. 6. 10. 3: 3. 7. 11. 4: 4. 8. 12. R8ROW_SORT_HEAP_INDEX_A_TEST R8ROW_SORT_HEAP_INDEX_A computes an index vector which ascending sorts an R8ROW. The unsorted R8ROW: Row 1 2 3 4 5 Col 1: 2.00000 4.00000 1.00000 3.00000 2.00000 2: 6.00000 8.00000 5.00000 7.00000 6.00000 3: 10.0000 12.0000 9.00000 11.0000 0.00000 Row 6 7 8 9 10 Col 1: 3.00000 0.00000 0.00000 2.00000 3.00000 2: 4.00000 0.00000 6.00000 6.00000 7.00000 3: 18.0000 0.00000 10.0000 10.0000 11.0000 Row 11 12 13 14 15 Col 1: 2.00000 2.00000 1.00000 1.00000 1.00000 2: 0.00000 6.00000 5.00000 5.00000 5.10000 3: 10.0000 10.0000 9.00000 9.10000 9.00000 The implicitly sorted R8ROW 7: 0.0 0.0 0.0 8: 0.0 6.0 10.0 13: 1.0 5.0 9.0 3: 1.0 5.0 9.0 14: 1.0 5.0 9.1 15: 1.0 5.1 9.0 11: 2.0 0.0 10.0 5: 2.0 6.0 0.0 12: 2.0 6.0 10.0 9: 2.0 6.0 10.0 1: 2.0 6.0 10.0 6: 3.0 4.0 18.0 10: 3.0 7.0 11.0 4: 3.0 7.0 11.0 2: 4.0 8.0 12.0 R8ROW_SORT_QUICK_A_TEST R8ROW_SORT_QUICK_A does a quicksort of an R8ROW. The unsorted matrix: Col 1 2 3 Row 1: 1.72828 9.70065 9.04506 2: 2.52320 3.32321 1.46981 3: 2.37869 1.77102 9.98172 4: 2.36226 5.05500 5.39893 5: 3.74362 3.86768 3.29626 6: 9.14317 4.49368 1.80245 7: 0.979916 3.38017 7.90327 8: 4.67370 3.60159 0.715112 9: 4.03338 0.251052E-01 4.55531 10: 9.16297 9.15505 1.13930 The sorted matrix: Col 1 2 3 Row 1: 0.979916 3.38017 7.90327 2: 1.72828 9.70065 9.04506 3: 2.36226 5.05500 5.39893 4: 2.37869 1.77102 9.98172 5: 2.52320 3.32321 1.46981 6: 3.74362 3.86768 3.29626 7: 4.03338 0.251052E-01 4.55531 8: 4.67370 3.60159 0.715112 9: 9.14317 4.49368 1.80245 10: 9.16297 9.15505 1.13930 R8ROW_SUM_TEST R8ROW_SUM computes row sums of an R8ROW; The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. The row sums: 1: 10.000000 2: 26.000000 3: 42.000000 R8ROW_SWAP_TEST R8ROW_SWAP swaps two rows of an R8ROW; The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. Swap rows 1 and 3 The modified matrix: Col 1 2 3 4 Row 1: 9. 10. 11. 12. 2: 5. 6. 7. 8. 3: 1. 2. 3. 4. R8ROW_TO_R8VEC_TEST R8ROW_TO_R8VEC converts an R8ROW into an R8VEC. The array of rows: Col 1 2 3 4 Row 1: 11. 12. 13. 14. 2: 21. 22. 23. 24. 3: 31. 32. 33. 34. The resulting vector of rows: 1: 11.000000 2: 12.000000 3: 13.000000 4: 14.000000 5: 21.000000 6: 22.000000 7: 23.000000 8: 24.000000 9: 31.000000 10: 32.000000 11: 33.000000 12: 34.000000 R8ROW_TRANSPOSE_PRINT_TEST R8ROW_TRANSPOSE_PRINT prints a R8ROW, transposed. Matrix row order M = 7 Matrix column order N = 12 The transposed matrix A: Row 1 2 3 4 5 Col 1: 101.000 201.000 301.000 401.000 501.000 2: 102.000 202.000 302.000 402.000 502.000 3: 103.000 203.000 303.000 403.000 503.000 4: 104.000 204.000 304.000 404.000 504.000 5: 105.000 205.000 305.000 405.000 505.000 6: 106.000 206.000 306.000 406.000 506.000 7: 107.000 207.000 307.000 407.000 507.000 8: 108.000 208.000 308.000 408.000 508.000 9: 109.000 209.000 309.000 409.000 509.000 10: 110.000 210.000 310.000 410.000 510.000 11: 111.000 211.000 311.000 411.000 511.000 12: 112.000 212.000 312.000 412.000 512.000 Row 6 7 Col 1: 601.000 701.000 2: 602.000 702.000 3: 603.000 703.000 4: 604.000 704.000 5: 605.000 705.000 6: 606.000 706.000 7: 607.000 707.000 8: 608.000 708.000 9: 609.000 709.000 10: 610.000 710.000 11: 611.000 711.000 12: 612.000 712.000 R8ROW_TRANSPOSE_PRINT_SOME_TEST R8ROW_TRANSPOSE_PRINT_SOME prints some of an R8ROW, transposed. Matrix row order M = 5 Matrix column order N = 4 The matrix A: Col 1 2 3 4 Row 1: 11. 12. 13. 14. 2: 21. 22. 23. 24. 3: 31. 32. 33. 34. 4: 41. 42. 43. 44. 5: 51. 52. 53. 54. The transposed matrix A, rows 1:3, cols 2:3: Row 1 2 3 Col 2: 12.0000 22.0000 32.0000 3: 13.0000 23.0000 33.0000 R8ROW_UNIFORM_AB_TEST R8ROW_UNIFORM_AB sets an R8ROW to random values in [A,B]. The random matrix: Col 1 2 3 4 Row 1: 6.05123 5.14240 6.85213 7.93276 2: 7.34125 3.34894 2.76867 7.89256 3: 6.46574 2.31806 5.53656 2.49932 4: 6.86226 2.44562 2.05570 8.72384 5: 2.31329 7.52202 3.25482 4.39106 R8ROW_VARIANCE_TEST R8ROW_VARIANCE computes variances of an R8ROW. The original matrix: Col 1 2 3 4 Row 1: 1. 2. 3. 4. 2: 5. 6. 7. 8. 3: 9. 10. 11. 12. Row variances: 1 1.6667 2 1.6667 3 1.6667 R8VEC_PRINT_TEST R8VEC_PRINT prints an R8VEC. The R8VEC: 1: 123.45600 2: 0.50000000E-05 3: -1000000.0 4: 3.1415927 R8ROW_TEST Normal end of execution. 14 September 2021 10:27:48.614 AM