27 July 2016 04:39:27 PM R8CB_PRB C++ version Test the R8CB library. R8CB_DET_TEST R8CB_DET computes the determinant of an R8CB matrix after it was factored by R8CB_NP_FA. Matrix order N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The compact band matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.561695 0.109957 0.401306 2 0.956318 0.415307 0.043829 0.754673 0.0945448 3 0.829509 0.0661187 0.633966 0.797287 0.0136169 4 0.257578 0.0617272 0.00183837 0.859097 5 0.449539 0.897504 0.840847 6 0.350752 0.123104 7 0.00751236 Col: 6 7 8 9 10 Row --- 3 0.260303 4 0.912484 0.692066 5 0.113664 0.561662 0.188955 6 0.351629 0.861216 0.761492 0.617205 7 0.822887 0.453794 0.396988 0.361529 0.299329 8 0.267132 0.911977 0.185314 0.21293 0.825003 9 0.597917 0.574366 0.714471 0.82466 10 0.367027 0.117707 0.0618618 R8CB_DET computes the determinant = 0.0183588 R8GE_DET computes the determinant = 0.0183588 R8CB_DIF2_TEST R8CB_DIF2 sets up an R8CB second difference matrix. Matrix rows M = 8 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The R8CB second difference matrix: Col: 1 2 3 4 5 Row --- 1 2 -1 0 0 2 -1 2 -1 0 0 3 0 -1 2 -1 0 4 0 -1 2 -1 5 0 -1 2 6 0 -1 7 0 Col: 6 7 8 Row --- 3 0 4 0 0 5 -1 0 0 6 2 -1 0 7 -1 2 -1 8 0 -1 2 R8CB_INDICATOR_TEST R8CB_INDICATOR sets up an R8CB indicator matrix. Matrix rows M = 8 Matrix columns N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 101 102 103 104 2 201 202 203 204 205 3 301 302 303 304 305 4 402 403 404 405 5 503 504 505 6 604 605 7 705 Col: 6 7 8 9 10 Row --- 3 306 4 406 407 5 506 507 508 6 606 607 608 609 7 706 707 708 709 710 8 806 807 808 809 810 R8CB_ML_TEST For a compact band matrix: R8CB_ML computes A*x or A'*X where A has been factored by R8CB_FA. Matrix order N = 10 Lower bandwidth ML = 1 Upper bandwidth MU = 2 A*x and PLU*x 0: 2.07579 2.07579 1: 5.3883 5.3883 2: 5.18076 5.18076 3: 8.02059 8.02059 4: 8.06762 8.06762 5: 12.7308 12.7308 6: 8.52067 8.52067 7: 15.4017 15.4017 8: 20.7578 20.7578 9: 13.7301 13.7301 A'*x and (PLU)'*x 0: 1.71194 1.71194 1: 2.49071 2.49071 2: 3.53774 3.53774 3: 7.10439 7.10439 4: 6.80503 6.80503 5: 14.9862 14.9862 6: 18.7469 18.7469 7: 7.88328 7.88328 8: 12.7733 12.7733 9: 2.65418 2.65418 R8CB_MTV_TEST R8CB_MTV computes b=A'*x, where A is an R8CB matrix. Matrix rows M = 8 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 1 The R8CB matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 6 64 65 7 75 Col: 6 7 8 Row --- 5 56 6 66 67 7 76 77 78 8 86 87 88 The vector x: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 The product b=A'*x: 1 146 2 320 3 582 4 932 5 1370 6 1896 7 1637 8 1250 R8CB_MV_TEST R8CB_MV computes b=A*x, where A is an R8CB matrix. Matrix rows M = 8 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 1 The R8CB matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 6 64 65 7 75 Col: 6 7 8 Row --- 5 56 6 66 67 7 76 77 78 8 86 87 88 The vector x: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 The product b=A*x: 1 35 2 134 3 330 4 614 5 986 6 1446 7 1994 8 1829 R8CB_NP_FA_TEST R8CB_NP_FA factors an R8CB matrix witn no pivoting; Matrix order N = 10 Lower bandwidth ML = 1 Upper bandwidth MU = 2 Solution to A*x=b: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Solution to A'x=b: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 R8CB_NP_SL_TEST R8CB_NP_SL solves a system factored by R8CB_NP_FA. Matrix order N = 10 Lower bandwidth ML = 1 Upper bandwidth MU = 2 Solution to A*x=b: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Solution to A'x=b: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 R8CB_PRINT_TEST R8CB_PRINT prints an R8CB matrix. Matrix rows M = 8 Matrix columns N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The R8CB matrix: Col: 1 2 3 4 5 Row --- 1 101 102 103 104 2 201 202 203 204 205 3 301 302 303 304 305 4 402 403 404 405 5 503 504 505 6 604 605 7 705 Col: 6 7 8 9 10 Row --- 3 306 4 406 407 5 506 507 508 6 606 607 608 609 7 706 707 708 709 710 8 806 807 808 809 810 R8CB_PRINT_SOME_TEST R8CB_PRINT_SOME prints some of an R8CB matrix. Matrix rows M = 8 Matrix columns N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 Rows 2-5, Cols 2-5: Col: 2 3 4 5 Row --- 2 202 203 204 205 3 302 303 304 305 4 402 403 404 405 5 503 504 505 R8CB_RANDOM_TEST R8CB_RANDOM randomizes an R8CB matrix. Matrix rows M = 8 Matrix columns N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The R8CB random matrix: Col: 1 2 3 4 5 Row --- 1 0.218418 0.561695 0.109957 0.401306 2 0.956318 0.415307 0.043829 0.754673 0.0945448 3 0.829509 0.0661187 0.633966 0.797287 0.0136169 4 0.257578 0.0617272 0.00183837 0.859097 5 0.449539 0.897504 0.840847 6 0.350752 0.123104 7 0.00751236 Col: 6 7 8 9 10 Row --- 3 0.260303 4 0.912484 0.692066 5 0.113664 0.561662 0.597917 6 0.351629 0.861216 0.188955 0.185314 7 0.822887 0.453794 0.761492 0.574366 0.617205 8 0.267132 0.911977 0.396988 0.367027 0.361529 R8CB_TO_R8GE_TEST R8CB_TO_R8GE converts an R8CB matrix to R8GE format. Matrix rows M = 5 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 1 The R8CB matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 Col: 6 7 8 Row --- 5 56 The R8GE matrix: Col: 1 2 3 4 5 Row --- 1 11 12 0 0 0 2 21 22 23 0 0 3 31 32 33 34 0 4 0 42 43 44 45 5 0 0 53 54 55 Col: 6 7 8 Row --- 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 56 0 0 R8CB_TO_R8VEC_TEST R8CB_TO_R8VEC converts an R8CB matrix to a real vector. Matrix rows M = 5 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 1 The R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 Col: 6 7 8 Row --- 5 56 1 1 1 0 2 1 2 11 3 1 3 21 4 1 4 31 1 2 5 12 2 2 6 22 3 2 7 32 4 2 8 42 1 3 9 23 2 3 10 33 3 3 11 43 4 3 12 53 1 4 13 34 2 4 14 44 3 4 15 54 4 4 16 0 1 5 17 45 2 5 18 55 3 5 19 0 4 5 20 0 1 6 21 56 2 6 22 0 3 6 23 0 4 6 24 0 1 7 25 0 2 7 26 0 3 7 27 0 4 7 28 0 1 8 29 0 2 8 30 0 3 8 31 0 4 8 32 0 The recovered R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 Col: 6 7 8 Row --- 5 56 R8CB_ZEROS_TEST R8CB_ZEROS zeros an R8CB matrix. Matrix rows M = 8 Matrix columns N = 10 Lower bandwidth ML = 2 Upper bandwidth MU = 3 The R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 0 0 0 0 2 0 0 0 0 0 3 0 0 0 0 0 4 0 0 0 0 5 0 0 0 6 0 0 7 0 Col: 6 7 8 9 10 Row --- 3 0 4 0 0 5 0 0 0 6 0 0 0 0 7 0 0 0 0 0 8 0 0 0 0 0 R8VEC_TO_R8CB_TEST R8VEC_TO_R8CB converts a real vector to an R8CB matrix. Matrix rows M = 5 Matrix columns N = 8 Lower bandwidth ML = 2 Upper bandwidth MU = 1 The R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 Col: 6 7 8 Row --- 5 56 1 1 1 0 2 1 2 11 3 1 3 21 4 1 4 31 1 2 5 12 2 2 6 22 3 2 7 32 4 2 8 42 1 3 9 23 2 3 10 33 3 3 11 43 4 3 12 53 1 4 13 34 2 4 14 44 3 4 15 54 4 4 16 0 1 5 17 45 2 5 18 55 3 5 19 0 4 5 20 0 1 6 21 56 2 6 22 0 3 6 23 0 4 6 24 0 1 7 25 0 2 7 26 0 3 7 27 0 4 7 28 0 1 8 29 0 2 8 30 0 3 8 31 0 4 8 32 0 The recovered R8CB indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 2 21 22 23 3 31 32 33 34 4 42 43 44 45 5 53 54 55 Col: 6 7 8 Row --- 5 56 R8CB_PRB Normal end of execution. 27 July 2016 04:39:27 PM