17-Sep-2024 14:45:36 rcm_test() MATLAB/Octave version 6.4.0 Test rcm(). rcm_test01(): ADJ_SET sets up an adjacency matrix incrementally. ADJ_SET - Note: Initializing adjacency information. Number of nodes NODE_NUM = 10 Maximum adjacency ADJ_MAX = 90 Creating and recording adjacency information: 1 9 5 2 2 6 7 5 7 2 8 2 9 7 5 5 2 8 7 7 10 2 7 4 4 10 1 5 3 9 1 9 1 1 1 9 8 7 6 7 1 4 8 4 5 2 7 9 6 9 4 4 1 4 4 9 3 7 10 9 9 6 1 5 4 1 7 1 9 3 10 7 2 4 2 10 1 1 4 10 3 2 5 2 8 6 4 9 10 3 3 4 10 5 10 2 6 6 2 6 8 5 2 10 9 1 7 3 3 8 1 1 6 3 2 4 4 9 6 2 3 1 9 4 7 6 5 4 4 3 10 3 6 10 10 8 3 1 2 6 7 7 6 3 10 6 4 1 7 10 10 2 6 1 2 6 2 10 Random adjacency matrix: Sparse adjacency structure: Number of nodes = 10 Number of adjacencies = 72 Node Min Max Nonzeros 1 1 6 3 4 5 6 7 9 2 7 13 3 4 5 6 7 8 10 3 14 21 1 2 4 6 7 8 9 10 4 22 29 1 2 3 5 7 8 9 10 5 30 35 1 2 4 7 8 10 6 36 42 1 2 3 7 8 9 10 7 43 51 1 2 3 4 5 6 8 9 10 8 52 58 2 3 4 5 6 7 10 9 59 64 1 3 4 6 7 10 10 65 72 2 3 4 5 6 7 8 9 Nonzero structure of matrix: 1 D.XXXXX.X. 2 .DXXXXXX.X 3 XXDX.XXXXX 4 XXXDX.XXXX 5 XX.XD.XX.X 6 XXX..DXXXX 7 XXXXXXDXXX 8 .XXXXXXD.X 9 X.XX.XX.DX 10 .XXXXXXXXD Lower bandwidth = 8 Lower envelope contains 36 nonzeros. rcm_test02(): GENRCM reorders the nodes in a graph using the Reverse Cuthill McKee algorithm. Adjacency matrix: Sparse adjacency structure: Number of nodes = 10 Number of adjacencies = 28 Node Min Max Nonzeros 1 1 2 4 6 2 3 6 3 5 7 10 3 7 9 2 4 5 4 10 13 1 3 6 9 5 14 16 2 3 7 6 17 20 1 4 7 8 7 21 24 2 5 6 8 8 25 26 6 7 9 27 27 4 10 28 28 2 Nonzero structure of matrix: 1 D..X.X.... 2 .DX.X.X..X 3 .XDXX..... 4 X.XD.X..X. 5 .XX.D.X... 6 X..X.DXX.. 7 .X..XXDX.. 8 .....XXD.. 9 ...X....D. 10 .X.......D Lower bandwidth = 8 Lower envelope contains 14 nonzeros. ADJ bandwidth = 17 The RCM permutation and inverse: 1 9 2 2 1 9 3 8 8 4 6 5 5 4 7 6 7 4 7 5 6 8 3 3 9 2 1 10 10 10 Permuted adjacency matrix: Nonzero structure of matrix: 1 D...X..... 2 .D.XX..... 3 ..DX.X.... 4 .XXDXX.... 5 XX.XD..X.. 6 ..XX.DX.X. 7 .....XDXX. 8 ....X.XDX. 9 .....XXXDX 10 ........XD Lower bandwidth = 4 Lower envelope contains 14 nonzeros. ADJ (permuted) bandwidth = 9 rcm_test03() GENRCM generates the Reverse Cuthill McKee ordering. Do the test twice. On the second test, randomly permute the initial nodes. TRIANGLE_NODE: Row: 1 2 3 Col 1: 1 2 6 2: 7 6 2 3: 2 3 7 4: 8 7 3 5: 3 4 8 6: 9 8 4 7: 4 5 9 8: 10 9 5 9: 6 7 11 10: 12 11 7 11: 7 8 12 12: 13 12 8 13: 8 9 13 14: 14 13 9 15: 9 10 14 16: 15 14 10 17: 11 12 16 18: 17 16 12 19: 12 13 17 20: 18 17 13 21: 13 14 18 22: 19 18 14 23: 14 15 19 24: 20 19 15 25: 16 17 21 26: 22 21 17 27: 17 18 22 28: 23 22 18 29: 18 19 23 30: 24 23 19 31: 19 20 24 32: 25 24 20 ADJ array: Sparse adjacency structure: Number of nodes = 25 Number of adjacencies = 137 Node Min Max Nonzeros 1 1 3 1 2 6 2 4 8 1 2 3 6 7 3 9 13 2 3 4 7 8 4 14 18 3 4 5 8 9 5 19 22 4 5 9 10 6 23 27 1 2 6 7 11 7 28 34 2 3 6 7 8 11 12 8 35 41 3 4 7 8 9 12 13 9 42 48 4 5 8 9 10 13 14 10 49 53 5 9 10 14 15 11 54 58 6 7 11 12 16 12 59 65 7 8 11 12 13 16 17 13 66 72 8 9 12 13 14 17 18 14 73 79 9 10 13 14 15 18 19 15 80 84 10 14 15 19 20 16 85 89 11 12 16 17 21 17 90 96 12 13 16 17 18 21 22 18 97 103 13 14 17 18 19 22 23 19 104 110 14 15 18 19 20 23 24 20 111 115 15 19 20 24 25 21 116 119 16 17 21 22 22 120 124 17 18 21 22 23 23 125 129 18 19 22 23 24 24 130 134 19 20 23 24 25 25 135 137 20 24 25 ADJ bandwidth = 11 The RCM permutation: 1: 1 2: 6 3: 2 4: 11 5: 7 6: 3 7: 16 8: 12 9: 8 10: 4 11: 21 12: 17 13: 13 14: 9 15: 5 16: 22 17: 18 18: 14 19: 10 20: 23 21: 19 22: 15 23: 24 24: 20 25: 25 Permuted ADJ bandwidth = 11 The random permutation: 1: 3 2: 11 3: 10 4: 23 5: 14 6: 18 7: 21 8: 17 9: 5 10: 22 11: 12 12: 25 13: 16 14: 24 15: 7 16: 19 17: 1 18: 20 19: 15 20: 13 21: 9 22: 2 23: 4 24: 8 25: 6 TRIANGLE_NODE: Row: 1 2 3 Col 1: 3 11 18 2: 21 18 11 3: 11 10 21 4: 17 21 10 5: 10 23 17 6: 5 17 23 7: 23 14 5 8: 22 5 14 9: 18 21 12 10: 25 12 21 11: 21 17 25 12: 16 25 17 13: 17 5 16 14: 24 16 5 15: 5 22 24 16: 7 24 22 17: 12 25 19 18: 1 19 25 19: 25 16 1 20: 20 1 16 21: 16 24 20 22: 15 20 24 23: 24 7 15 24: 13 15 7 25: 19 1 9 26: 2 9 1 27: 1 20 2 28: 4 2 20 29: 20 15 4 30: 8 4 15 31: 15 13 8 32: 6 8 13 ADJ array: Sparse adjacency structure: Number of nodes = 25 Number of adjacencies = 137 Node Min Max Nonzeros 1 1 7 1 2 9 16 19 20 25 2 8 12 1 2 4 9 20 3 13 15 3 11 18 4 16 20 2 4 8 15 20 5 21 27 5 14 16 17 22 23 24 6 28 30 6 8 13 7 31 35 7 13 15 22 24 8 36 40 4 6 8 13 15 9 41 44 1 2 9 19 10 45 49 10 11 17 21 23 11 50 54 3 10 11 18 21 12 55 59 12 18 19 21 25 13 60 64 6 7 8 13 15 14 65 68 5 14 22 23 15 69 75 4 7 8 13 15 20 24 16 76 82 1 5 16 17 20 24 25 17 83 89 5 10 16 17 21 23 25 18 90 94 3 11 12 18 21 19 95 99 1 9 12 19 25 20 100 106 1 2 4 15 16 20 24 21 107 113 10 11 12 17 18 21 25 22 114 118 5 7 14 22 24 23 119 123 5 10 14 17 23 24 124 130 5 7 15 16 20 22 24 25 131 137 1 12 16 17 19 21 25 ADJ bandwidth = 49 The RCM permutation: 1: 6 2: 8 3: 13 4: 4 5: 15 6: 7 7: 2 8: 20 9: 24 10: 22 11: 9 12: 1 13: 14 14: 16 15: 5 16: 19 17: 25 18: 23 19: 17 20: 12 21: 21 22: 10 23: 18 24: 11 25: 3 Permuted ADJ bandwidth = 13 TEST04 GENRCM generates the Reverse Cuthill McKee ordering. The random permutation: 1: 13 2: 12 3: 22 4: 11 5: 10 6: 1 7: 15 8: 20 9: 24 10: 5 11: 6 12: 21 13: 25 14: 8 15: 18 16: 16 17: 19 18: 7 19: 3 20: 23 21: 9 22: 14 23: 4 24: 2 25: 17 Permuted TRIANGLE_NODE Row: 1 2 3 4 5 6 Col 1: 13 22 6 12 15 1 2: 25 6 22 21 15 20 3: 22 10 25 11 24 20 4: 18 25 10 8 24 5 5: 6 25 9 21 19 16 6: 4 9 25 14 19 7 7: 25 18 4 8 3 7 8: 17 4 18 2 3 23 ADJ array: Sparse adjacency structure: Number of nodes = 25 Number of adjacencies = 217 Node Min Max Nonzeros 1 1 6 1 6 12 13 15 22 2 7 12 2 3 4 17 18 23 3 13 21 2 3 4 7 8 17 18 23 25 4 22 33 2 3 4 7 8 9 14 17 18 19 23 25 5 34 39 5 8 10 18 24 25 6 40 51 1 6 9 12 13 15 16 19 20 21 22 25 7 52 60 3 4 7 8 9 14 18 19 25 8 61 69 3 4 5 7 8 10 18 24 25 9 70 78 4 6 7 9 14 16 19 21 25 10 79 87 5 8 10 11 18 20 22 24 25 11 88 93 10 11 20 22 24 25 12 94 99 1 6 12 13 15 22 13 100 105 1 6 12 13 15 22 14 106 111 4 7 9 14 19 25 15 112 120 1 6 12 13 15 20 21 22 25 16 121 126 6 9 16 19 21 25 17 127 132 2 3 4 17 18 23 18 133 144 2 3 4 5 7 8 10 17 18 23 24 25 19 145 153 4 6 7 9 14 16 19 21 25 20 154 162 6 10 11 15 20 21 22 24 25 21 163 171 6 9 15 16 19 20 21 22 25 22 172 183 1 6 10 11 12 13 15 20 21 22 24 25 23 184 189 2 3 4 17 18 23 24 190 198 5 8 10 11 18 20 22 24 25 25 199 217 3 4 5 6 7 8 9 10 11 14 15 16 18 19 20 21 22 24 25 ADJ bandwidth = 45 The RCM permutation: 1: 13 2: 12 3: 1 4: 22 5: 21 6: 20 7: 15 8: 16 9: 11 10: 6 11: 24 12: 10 13: 5 14: 19 15: 14 16: 9 17: 25 18: 8 19: 7 20: 18 21: 4 22: 23 23: 17 24: 3 25: 2 Permuted ADJ bandwidth = 27 TEST05 GRAPH_01_SIZE returns the sizes for graph 1. GRAPH_01_ADJ returns the adjacency for graph 1. ADJ_PRINT prints the adjacency information. Adjacency for GRAPH_01: Sparse adjacency structure: Number of nodes = 10 Number of adjacencies = 28 Node Min Max Nonzeros 1 1 2 4 6 2 3 6 3 5 7 10 3 7 9 2 4 5 4 10 13 1 3 6 9 5 14 16 2 3 7 6 17 20 1 4 7 8 7 21 24 2 5 6 8 8 25 26 6 7 9 27 27 4 10 28 28 2 Nonzero structure of matrix: 1 D..X.X.... 2 .DX.X.X..X 3 .XDXX..... 4 X.XD.X..X. 5 .XX.D.X... 6 X..X.DXX.. 7 .X..XXDX.. 8 .....XXD.. 9 ...X....D. 10 .X.......D Lower bandwidth = 8 Lower envelope contains 14 nonzeros. TEST06 LEVEL_SET computes the level sets of a graph, given a root node (which defines level 1). Adjacency matrix: Sparse adjacency structure: Number of nodes = 10 Number of adjacencies = 28 Node Min Max Nonzeros 1 1 2 4 6 2 3 6 3 5 7 10 3 7 9 2 4 5 4 10 13 1 3 6 9 5 14 16 2 3 7 6 17 20 1 4 7 8 7 21 24 2 5 6 8 8 25 26 6 7 9 27 27 4 10 28 28 2 Nonzero structure of matrix: 1 D..X.X.... 2 .DX.X.X..X 3 .XDXX..... 4 X.XD.X..X. 5 .XX.D.X... 6 X..X.DXX.. 7 .X..XXDX.. 8 .....XXD.. 9 ...X....D. 10 .X.......D Lower bandwidth = 8 Lower envelope contains 14 nonzeros. LEVEL_PRINT Show the level set structure of a rooted graph. The number of nodes is 10 The number of levels is 4 Level Min Max Nonzeros 1 1 1 4 2 2 5 1 3 6 9 3 6 9 2 5 7 8 4 10 10 10 LEVEL_PRINT Show the level set structure of a rooted graph. The number of nodes is 10 The number of levels is 4 Level Min Max Nonzeros 1 1 1 6 2 2 5 1 4 7 8 3 6 9 3 9 2 5 4 10 10 10 LEVEL_PRINT Show the level set structure of a rooted graph. The number of nodes is 10 The number of levels is 4 Level Min Max Nonzeros 1 1 1 3 2 2 4 2 4 5 3 5 9 7 10 1 6 9 4 10 10 8 TEST07 ROOT_FIND is given a node in the graph, and returns a better node to use as a starting point for reordering. Adjacency matrix: Sparse adjacency structure: Number of nodes = 10 Number of adjacencies = 28 Node Min Max Nonzeros 1 1 2 4 6 2 3 6 3 5 7 10 3 7 9 2 4 5 4 10 13 1 3 6 9 5 14 16 2 3 7 6 17 20 1 4 7 8 7 21 24 2 5 6 8 8 25 26 6 7 9 27 27 4 10 28 28 2 Nonzero structure of matrix: 1 D..X.X.... 2 .DX.X.X..X 3 .XDXX..... 4 X.XD.X..X. 5 .XX.D.X... 6 X..X.DXX.. 7 .X..XXDX.. 8 .....XXD.. 9 ...X....D. 10 .X.......D Lower bandwidth = 8 Lower envelope contains 14 nonzeros. Starting root = 1 Suggested root = 10 Number of levels = 5 Starting root = 2 Suggested root = 10 Number of levels = 5 Starting root = 3 Suggested root = 8 Number of levels = 4 Starting root = 4 Suggested root = 9 Number of levels = 5 Starting root = 5 Suggested root = 10 Number of levels = 5 Starting root = 6 Suggested root = 9 Number of levels = 5 Starting root = 7 Suggested root = 10 Number of levels = 5 Starting root = 8 Suggested root = 10 Number of levels = 5 Starting root = 9 Suggested root = 10 Number of levels = 5 Starting root = 10 Suggested root = 9 Number of levels = 5 TEST08 TRIANGULATION_ORDER3_ADJ_COUNT counts the (lower) adjacencies defined by a triangulation. TRIANGLE_NODE Row: 1 2 3 Col 1: 1 2 6 2: 7 6 2 3: 2 3 7 4: 8 7 3 5: 3 4 8 6: 9 8 4 7: 4 5 9 8: 10 9 5 9: 6 7 11 10: 12 11 7 11: 7 8 12 12: 13 12 8 13: 8 9 13 14: 14 13 9 15: 9 10 14 16: 15 14 10 17: 11 12 16 18: 17 16 12 19: 12 13 17 20: 18 17 13 21: 13 14 18 22: 19 18 14 23: 14 15 19 24: 20 19 15 25: 16 17 21 26: 22 21 17 27: 17 18 22 28: 23 22 18 29: 18 19 23 30: 24 23 19 31: 19 20 24 32: 25 24 20 ADJ_ROW 1: 1 2: 4 3: 9 4: 14 5: 19 6: 23 7: 28 8: 35 9: 42 10: 49 11: 54 12: 59 13: 66 14: 73 15: 80 16: 85 17: 90 18: 97 19: 104 20: 111 21: 116 22: 120 23: 125 24: 130 25: 135 26: 138 TEST09 TRIANGULATION_ORDER3_ADJ_SET sets the (lower) adjacencies defined by a triangulation. TRIANGLE_NODE Row: 1 2 3 Col 1: 1 2 6 2: 7 6 2 3: 2 3 7 4: 8 7 3 5: 3 4 8 6: 9 8 4 7: 4 5 9 8: 10 9 5 9: 6 7 11 10: 12 11 7 11: 7 8 12 12: 13 12 8 13: 8 9 13 14: 14 13 9 15: 9 10 14 16: 15 14 10 17: 11 12 16 18: 17 16 12 19: 12 13 17 20: 18 17 13 21: 13 14 18 22: 19 18 14 23: 14 15 19 24: 20 19 15 25: 16 17 21 26: 22 21 17 27: 17 18 22 28: 23 22 18 29: 18 19 23 30: 24 23 19 31: 19 20 24 32: 25 24 20 ADJ array: Sparse adjacency structure: Number of nodes = 25 Number of adjacencies = 137 Node Min Max Nonzeros 1 1 3 1 2 6 2 4 8 1 2 3 6 7 3 9 13 2 3 4 7 8 4 14 18 3 4 5 8 9 5 19 22 4 5 9 10 6 23 27 1 2 6 7 11 7 28 34 2 3 6 7 8 11 12 8 35 41 3 4 7 8 9 12 13 9 42 48 4 5 8 9 10 13 14 10 49 53 5 9 10 14 15 11 54 58 6 7 11 12 16 12 59 65 7 8 11 12 13 16 17 13 66 72 8 9 12 13 14 17 18 14 73 79 9 10 13 14 15 18 19 15 80 84 10 14 15 19 20 16 85 89 11 12 16 17 21 17 90 96 12 13 16 17 18 21 22 18 97 103 13 14 17 18 19 22 23 19 104 110 14 15 18 19 20 23 24 20 111 115 15 19 20 24 25 21 116 119 16 17 21 22 22 120 124 17 18 21 22 23 23 125 129 18 19 22 23 24 24 130 134 19 20 23 24 25 25 135 137 20 24 25 ADJ bandwidth = 11 RCM_TEST10 For a triangulation of a set of nodes, TRIANGULATION_NEIGHBOR_TRIANGLES determines the adjacency relationships between triangles. Triangles: Row: 1 2 3 Col 1: 3 4 1 2: 3 1 2 3: 3 2 8 4: 2 1 5 5: 8 2 13 6: 8 13 9 7: 3 8 9 8: 13 2 5 9: 9 13 7 10: 7 13 5 11: 6 7 5 12: 9 7 6 13: 10 9 6 14: 6 5 12 15: 11 6 12 16: 10 6 11 Triangle neighbors: Row: 1 2 3 Col 1: -1 2 -1 2: 4 3 1 3: 5 7 2 4: -1 8 2 5: 8 6 3 6: 9 7 5 7: 6 -1 3 8: 4 10 5 9: 10 12 6 10: 8 11 9 11: 10 14 12 12: 11 13 9 13: 12 16 -1 14: -1 15 11 15: 14 -1 16 16: 15 -1 13 TEST11 TRIANGULATION_ORDER6_ADJ_COUNT counts the (lower) adjacencies defined by a triangulation. ADJ_ROW 1: 1 2: 7 3: 13 4: 25 5: 31 6: 40 7: 46 8: 55 9: 64 10: 73 11: 79 12: 91 13: 100 14: 119 15: 128 16: 140 17: 146 18: 155 19: 164 20: 173 21: 179 22: 188 23: 194 24: 206 25: 212 26: 218 TEST12 TRIANGULATION_ORDER6_ADJ_SET sets the (lower) adjacencies defined by a triangulation. TRIANGLE_NODE Row: 1 2 3 4 5 6 Col 1: 1 3 11 2 7 6 2: 13 11 3 12 7 8 3: 3 5 13 4 9 8 4: 15 13 5 14 9 10 5: 11 13 21 12 17 16 6: 23 21 13 22 17 18 7: 13 15 23 14 19 18 8: 25 23 15 24 19 20 ADJ array: Sparse adjacency structure: Number of nodes = 25 Number of adjacencies = 217 Node Min Max Nonzeros 1 1 6 1 2 3 6 7 11 2 7 12 1 2 3 6 7 11 3 13 24 1 2 3 4 5 6 7 8 9 11 12 13 4 25 30 3 4 5 8 9 13 5 31 39 3 4 5 8 9 10 13 14 15 6 40 45 1 2 3 6 7 11 7 46 54 1 2 3 6 7 8 11 12 13 8 55 63 3 4 5 7 8 9 11 12 13 9 64 72 3 4 5 8 9 10 13 14 15 10 73 78 5 9 10 13 14 15 11 79 90 1 2 3 6 7 8 11 12 13 16 17 21 12 91 99 3 7 8 11 12 13 16 17 21 13 100 118 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 21 22 23 14 119 127 5 9 10 13 14 15 18 19 23 15 128 139 5 9 10 13 14 15 18 19 20 23 24 25 16 140 145 11 12 13 16 17 21 17 146 154 11 12 13 16 17 18 21 22 23 18 155 163 13 14 15 17 18 19 21 22 23 19 164 172 13 14 15 18 19 20 23 24 25 20 173 178 15 19 20 23 24 25 21 179 187 11 12 13 16 17 18 21 22 23 22 188 193 13 17 18 21 22 23 23 194 205 13 14 15 17 18 19 20 21 22 23 24 25 24 206 211 15 19 20 23 24 25 25 212 217 15 19 20 23 24 25 ADJ bandwidth = 21 rcm_test(): Normal end of execution. 17-Sep-2024 14:45:36