16 November 2015 09:50:45 PM R8UTT_PRB C++ version Test the R8UTT library. R8UTT_DET_TEST R8UTT_DET computes the determinant of an R8UTT matrix. The matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 Determinant is 0.000497102 R8UTT_INDICATOR_TEST R8UTT_INDICATOR sets up an indicator matrix in R8UTT format Matrix order N = 5 The indicator matrix: Col: 0 1 2 3 4 Row --- 0 1 2 3 4 5 1 1 2 3 4 2 1 2 3 3 1 2 4 1 R8UTT_INVERSE_TEST R8UTT_INVERSE computes the inverse of an R8UTT matrix. The matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 The inverse matrix B: Col: 0 1 2 3 4 Row --- 0 4.57837 -20.0458 70.3805 -243.796 842.985 1 4.57837 -20.0458 70.3805 -243.796 2 4.57837 -20.0458 70.3805 3 4.57837 -20.0458 4 4.57837 The product A * B: Col: 0 1 2 3 4 Row --- 0 1 8.88178e-16 4.44089e-15 3.55271e-15 -3.93019e-14 1 1 8.88178e-16 4.44089e-15 3.55271e-15 2 1 8.88178e-16 4.44089e-15 3 1 8.88178e-16 4 1 R8UTT_MM_TEST R8UTT_MM computes C = A * B for R8UTT matrices. Matrix order N = 5 Factor A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 Factor B: Col: 0 1 2 3 4 Row --- 0 0.0661187 0.257578 0.109957 0.043829 0.633966 1 0.0661187 0.257578 0.109957 0.043829 2 0.0661187 0.257578 0.109957 3 0.0661187 0.257578 4 0.0661187 The product C = A * B Col: 0 1 2 3 4 Row --- 0 0.0144415 0.11949 0.325189 0.365528 0.443734 1 0.0144415 0.11949 0.325189 0.365528 2 0.0144415 0.11949 0.325189 3 0.0144415 0.11949 4 0.0144415 The R8GE product C: Col: 1 2 3 4 5 Row --- 1 0.0144415 0.11949 0.325189 0.365528 0.443734 2 0 0.0144415 0.11949 0.325189 0.365528 3 0 0 0.0144415 0.11949 0.325189 4 0 0 0 0.0144415 0.11949 5 0 0 0 0 0.0144415 R8UTT_MTM_TEST R8UTT_MTM computes C = A' * B for R8UTT matrices. The matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 The matrix B: Col: 0 1 2 3 4 Row --- 0 0.0661187 0.257578 0.109957 0.043829 0.633966 1 0.0661187 0.257578 0.109957 0.043829 2 0.0661187 0.257578 0.109957 3 0.0661187 0.257578 4 0.0661187 The product C = A' * B: Col: 1 2 3 4 5 Row --- 1 0.0144415 0.0562597 0.0240166 0.00957306 0.13847 2 0.0632305 0.260768 0.161413 0.065931 0.615846 3 0.0548461 0.276894 0.351978 0.19777 0.591811 4 0.0371386 0.199526 0.338656 0.376596 0.553866 5 0.0274596 0.144112 0.245192 0.356858 0.639887 The R8GE product C = A' * B: Col: 1 2 3 4 5 Row --- 1 0.0144415 0.0562597 0.0240166 0.00957306 0.13847 2 0.0632305 0.260768 0.161413 0.065931 0.615846 3 0.0548461 0.276894 0.351978 0.19777 0.591811 4 0.0371386 0.199526 0.338656 0.376596 0.553866 5 0.0274596 0.144112 0.245192 0.356858 0.639887 R8UTT_MTV_TEST R8UTT_MTV computes a matrix product b=A'*x for an R8UTT matrix. Matrix order N = 5 The matrix A: Col: 0 1 2 3 4 Row --- 0 1 2 3 4 5 1 1 2 3 4 2 1 2 3 3 1 2 4 1 The vector X: 0: 1 1: 2 2: 3 3: 4 4: 5 The vector b=A'*x: 0: 1 1: 4 2: 10 3: 20 4: 35 R8UTT_MV_TEST R8UTT_MV computes a product b=A*x for an R8UTT matrix. Matrix order N = 5 The R8UTT matrix A: Col: 0 1 2 3 4 Row --- 0 1 2 3 4 5 1 1 2 3 4 2 1 2 3 3 1 2 4 1 Vector x: 0: 1 1: 2 2: 3 3: 4 4: 5 Vector b = A*x: 0: 55 1: 40 2: 26 3: 14 4: 5 R8UTT_PRINT_TEST R8UTT_PRINT prints an R8UTT matrix. Matrix order N = 5 The matrix: Col: 0 1 2 3 4 Row --- 0 1 2 3 4 5 1 1 2 3 4 2 1 2 3 3 1 2 4 1 R8UTT_PRINT_SOME_TEST R8UTT_PRINT_SOME prints some of an R8UTT matrix. Matrix order N = 5 Some of the matrix: Col: 4 Row --- 1 4 2 3 3 2 R8UTT_RANDOM_TEST R8UTT_RANDOM randomizes an R8UTT matrix. Matrix order N = 5 Matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 R8UTT_SL_TEST R8UTT_SL solves a linear system A*x=b with R8UTT matrix Matrix order N = 5 Matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 Right hand side b: 0: 8.9429 1: 9.4323 2: 8.62807 3: 5.65526 4: 1.09209 Solution x: 0: 1 1: 2 2: 3 3: 4 4: 5 R8UTT_SLT_TEST R8UTT_SLT solves a linear system A'x=b with R8UTT matrix Matrix order N = 5 Matrix A: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 Right hand side b: 0: 0.218418 1: 1.39315 2: 3.3974 3: 5.96334 4: 8.94459 Solution x: 0: 1 1: 2 2: 3 3: 4 4: 5 R8UTT_TO_R8GE_TEST R8UTT_TO_R8GE converts an R8UTT matrix to R8GE format. R8UTT matrix: Col: 0 1 2 3 4 Row --- 0 0.218418 0.956318 0.829509 0.561695 0.415307 1 0.218418 0.956318 0.829509 0.561695 2 0.218418 0.956318 0.829509 3 0.218418 0.956318 4 0.218418 R8GE matrix Col: 1 2 3 4 5 Row --- 1 0.218418 0.956318 0.829509 0.561695 0.415307 2 0 0.218418 0.956318 0.829509 0.561695 3 0 0 0.218418 0.956318 0.829509 4 0 0 0 0.218418 0.956318 5 0 0 0 0 0.218418 R8UTT_ZEROS_TEST R8UTT_ZEROS returns a zeroed out R8UTT matrix. Matrix order N = 5 Matrix A: Col: 0 1 2 3 4 Row --- 0 0 0 0 0 0 1 0 0 0 0 2 0 0 0 3 0 0 4 0 R8UTT_PRB Normal end of execution. 16 November 2015 09:50:45 PM