2 March 2016 9:03:09.704 AM R8ROW_PRB 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: -1.72373 -4.00822 -4.07409 -4.97242 7.88645 2: 9.34476 -1.13633 1.74308 8.46256 7.61271 3: 7.44264 -3.35065 1.01959 0.261285 -3.15344 4: 3.42543 -4.34257 6.32010 -3.58183 -4.88731 5: 1.22961 4.50949 6.95930 -4.79575 -1.09546 Col 6 7 8 9 10 Row 1: 8.68726 5.38100 3.96875 3.61549 5.71707 2: -3.29504 3.42494 -2.16568 0.505400 -3.23440 3: 0.274430 7.91824 6.42238 4.25807 -0.510063 4: 7.34331 1.80691 0.954827 0.422931 7.37504 5: -0.993016 8.67966 -2.22029 -1.80605 7.36990 Running averages: Col 1 2 3 4 5 Row 1: 0. -1.72373 -2.86597 -3.26868 -3.69462 2: 0. 9.34476 4.10422 3.31717 4.60352 3: 0. 7.44264 2.04600 1.70386 1.34322 4: 0. 3.42543 -0.458567 1.80099 0.455285 5: 0. 1.22961 2.86955 4.23280 1.97566 Col 6 7 8 9 10 Row 1: -1.37840 0.299208 1.02518 1.39312 1.64005 2: 5.20536 3.78862 3.73667 2.99888 2.72182 3: 0.443886 0.415643 1.48744 2.10431 2.34362 4: -0.613235 0.712856 0.869149 0.879859 0.829089 5: 1.36144 0.969030 2.07055 1.53419 1.16306 Col 11 Row 1: 2.04776 2: 2.12620 3: 2.05825 4: 1.48368 5: 1.78374 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: -1.72373 -4.00822 -4.07409 -4.97242 7.88645 2: 9.34476 -1.13633 1.74308 8.46256 7.61271 3: 7.44264 -3.35065 1.01959 0.261285 -3.15344 4: 3.42543 -4.34257 6.32010 -3.58183 -4.88731 5: 1.22961 4.50949 6.95930 -4.79575 -1.09546 Col 6 7 8 9 10 Row 1: 8.68726 5.38100 3.96875 3.61549 5.71707 2: -3.29504 3.42494 -2.16568 0.505400 -3.23440 3: 0.274430 7.91824 6.42238 4.25807 -0.510063 4: 7.34331 1.80691 0.954827 0.422931 7.37504 5: -0.993016 8.67966 -2.22029 -1.80605 7.36990 Running sums: Col 1 2 3 4 5 Row 1: 0. -1.72373 -5.73194 -9.80604 -14.7785 2: 0. 9.34476 8.20843 9.95151 18.4141 3: 0. 7.44264 4.09199 5.11158 5.37287 4: 0. 3.42543 -0.917133 5.40297 1.82114 5: 0. 1.22961 5.73909 12.6984 7.90265 Col 6 7 8 9 10 Row 1: -6.89201 1.79525 7.17625 11.1450 14.7605 2: 26.0268 22.7317 26.1567 23.9910 24.4964 3: 2.21943 2.49386 10.4121 16.8345 21.0925 4: -3.06617 4.27714 6.08404 7.03887 7.46180 5: 6.80719 5.81418 14.4938 12.2735 10.4675 Col 11 Row 1: 20.4776 2: 21.2620 3: 20.5825 4: 14.8368 5: 17.8374 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: 2.18418 0.617272 8.59097 2: 9.56318 4.49539 8.40847 3: 8.29509 4.01306 1.23104 4: 5.61695 7.54673 0.751236E-01 5: 4.15307 7.97287 2.60303 6: 0.661187 0.183837E-01 9.12484 7: 2.57578 8.97504 1.13664 8: 1.09957 3.50752 3.51629 9: 0.438290 0.945448 8.22887 10: 6.33966 0.136169 2.67132 The sorted matrix: Col 1 2 3 Row 1: 0.438290 0.945448 8.22887 2: 0.661187 0.183837E-01 9.12484 3: 1.09957 3.50752 3.51629 4: 2.18418 0.617272 8.59097 5: 2.57578 8.97504 1.13664 6: 4.15307 7.97287 2.60303 7: 5.61695 7.54673 0.751236E-01 8: 6.33966 0.136169 2.67132 9: 8.29509 4.01306 1.23104 10: 9.56318 4.49539 8.40847 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]. Using initial random number seed = 123456789 The random matrix: Col 1 2 3 4 Row 1: 3.74735 2.52895 2.49382 2.01471 2: 9.65054 4.06062 5.59631 9.18003 3: 8.63607 2.87965 5.21045 4.80602 4: 6.49356 2.35063 8.03739 2.75636 5: 5.32246 7.07173 8.37830 2.10894 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 R8LIB_PRB Normal end of execution. 2 March 2016 9:03:09.707 AM