03 July 2016 08:41:58 PM LINPLUS_PRB C++ version Test the LINPLUS library. R8GE_TO_R8PO_TEST R8GE_TO_R8PO converts an R8GE matrix to R8PO format. Matrix order N = 5 The random R8GE matrix A: Col: 1 2 3 4 5 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 0.859097 2 0.956318 0.257578 0.449539 0.897504 0.840847 3 0.829509 0.109957 0.401306 0.350752 0.123104 4 0.561695 0.043829 0.754673 0.0945448 0.00751236 5 0.415307 0.633966 0.797287 0.0136169 0.260303 The R8PO matrix Col: 1 2 3 4 5 Row --- 1 0.218418 0.0661187 0.0617272 0.00183837 0.859097 2 0.0661187 0.257578 0.449539 0.897504 0.840847 3 0.0617272 0.449539 0.401306 0.350752 0.123104 4 0.00183837 0.897504 0.350752 0.0945448 0.00751236 5 0.859097 0.840847 0.123104 0.00751236 0.260303 R8PO_DET_TEST R8PO_DET computes the determinant of a symmetric positive definite matrix factored by R8PO_FA, Matrix order N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 2 -1 0 0 2 -1 2 -1 0 3 0 -1 2 -1 4 0 0 -1 2 Determinant of A = 5 R8PO_DIF2_TEST R8PO_DIF2 sets the second difference matrix in R8PO format. The R8PO DIF2 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 R8PO_FA_TEST R8PO_FA factors a positive definite symmetric linear system, Matrix order N = 5 The matrix A: Col: 1 2 3 4 5 Row --- 1 1 1 1 1 1 2 1 2 2 2 2 3 1 2 3 3 3 4 1 2 3 4 4 5 1 2 3 4 5 The factor R (an R8UT matrix): Col: 0 1 2 3 4 Row --- 0 1 1 1 1 1 1 1 1 1 1 2 1 1 1 3 1 1 4 1 The product R' * R: Col: 1 2 3 4 5 Row --- 1 1 1 1 1 1 2 1 2 2 2 2 3 1 2 3 3 3 4 1 2 3 4 4 5 1 2 3 4 5 R8PO_INDICATOR_TEST R8PO_INDICATOR sets up an R8PO indicator matrix. Matrix order N = 5 The R8PO indicator matrix: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 12 22 23 24 25 3 13 23 33 34 35 4 14 24 34 44 45 5 15 25 35 45 55 R8PO_INVERSE_TEST R8PO_INVERSE computes the inverse of a symmetric positive definite matrix factored by R8PO_FA, Matrix order N = 4 Matrix A: Col: 1 2 3 4 Row --- 1 1 1 1 1 2 1 2 2 2 3 1 2 3 3 4 1 2 3 4 Inverse matrix A_INV: Col: 1 2 3 4 Row --- 1 2 -1 0 -0 2 -1 2 -1 -0 3 0 -1 2 -1 4 -0 -0 -1 1 Product A * A_INV: Col: 1 2 3 4 Row --- 1 1 0 0 0 2 0 1 0 0 3 0 0 1 0 4 0 0 0 1 R8PO_ML_TEST R8PO_ML can compute A*x for an R8PO matrix A even after it has been factored by R8PO_FA. Solution: 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Solution: 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 R8PO_MM_TEST R8PO_MM computes the product of two symmetric positive definite matrices. Matrix order N = 5 Matrix A: 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 Matrix B: Col: 1 2 3 4 5 Row --- 1 1 2 0 0 0 2 2 3 4 0 0 3 0 4 5 6 0 4 0 0 6 7 8 5 0 0 0 8 9 Product matrix C = A * B: Col: 1 2 3 4 5 Row --- 1 0 1 -4 0 0 2 1 0 3 -6 0 3 -4 3 0 5 -8 4 0 -6 5 0 7 5 0 0 -8 7 10 R8PO_MV_TEST R8PO_MV computes the product of an R8PO matrix and a vector. Matrix order N = 5 Matrix A: 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 Vector V: 1 1 2 2 3 3 4 4 5 5 Product w = A * v: 1 0 2 0 3 0 4 0 5 6 R8PO_PRINT_TEST R8PO_PRINT prints an R8PO matrix. The R8PO matrix: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 12 22 23 24 25 3 13 23 33 34 35 4 14 24 34 44 45 5 15 25 35 45 55 R8PO_PRINT_SOME_TEST R8PO_PRINT_SOME prints some of an R8PO matrix. Rows 2-6, 5-7: Col: 5 6 7 Row --- 2 205 206 207 3 305 306 307 4 405 406 407 5 505 506 507 6 506 606 607 R8PO_RANDOM_TEST R8PO_RANDOM computes a random positive definite symmetric matrix. Matrix order N = 5 The random R8PO matrix: Col: 1 2 3 4 5 Row --- 1 0.00381025 0.0277488 0.0247715 0.0465839 0.0492143 2 0.0277488 0.268432 0.208725 0.350545 0.521707 3 0.0247715 0.208725 0.488639 0.540951 0.426804 4 0.0465839 0.350545 0.540951 1.65848 1.45021 5 0.0492143 0.521707 0.426804 1.45021 1.77774 R8PO_SL_TEST R8PO_SL solves a linear system with an R8PO matrix after it has been factored by R8PO_FA. Matrix A: 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 Right hand side b: 1 0 2 0 3 0 4 0 5 6 Solution x: 1 1 2 2 3 3 4 4 5 5 R8PO_TO_R8GE_TEST R8PO_TO_R8GE converts an R8PO matrix to R8GE format. Matrix order N = 5 The random R8PO matrix: Col: 1 2 3 4 5 Row --- 1 0.00381025 0.0277488 0.0247715 0.0465839 0.0492143 2 0.0277488 0.268432 0.208725 0.350545 0.521707 3 0.0247715 0.208725 0.488639 0.540951 0.426804 4 0.0465839 0.350545 0.540951 1.65848 1.45021 5 0.0492143 0.521707 0.426804 1.45021 1.77774 The random R8PO matrix (printed by R8GE_PRINT): Col: 1 2 3 4 5 Row --- 1 0.00381025 0.0277488 0.0247715 0.0465839 0.0492143 2 0 0.268432 0.208725 0.350545 0.521707 3 0 0 0.488639 0.540951 0.426804 4 0 0 0 1.65848 1.45021 5 0 0 0 0 1.77774 The random R8GE matrix (printed by R8GE_PRINT): Col: 1 2 3 4 5 Row --- 1 0.00381025 0.0277488 0.0247715 0.0465839 0.0492143 2 0.0277488 0.268432 0.208725 0.350545 0.521707 3 0.0247715 0.208725 0.488639 0.540951 0.426804 4 0.0465839 0.350545 0.540951 1.65848 1.45021 5 0.0492143 0.521707 0.426804 1.45021 1.77774 R8PO_ZEROS_TEST R8PO_ZEROS returns zeroed out space for a symmetric positive definite matrix. Matrix order N = 5 Matrix A: 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 LINPLUS_PRB Normal end of execution. 03 July 2016 08:41:58 PM