Dimension reduction
aut_processing(aut_in)
Processes automorphism data from a list of strings and prepares it for further analysis.
Parameters: aut_in (list): A list of strings representing automorphism data, where the first line contains 'N' and the second line contains 'z'.
Returns: str or int: The processed 'z' value for GAP input if the network is small enough, otherwise returns -1 to indicate skipping.
Source code in dsdp-lumping/lumping.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
cycle_number(p, n)
Calculates the total number of cycles in a permutation.
Parameters: p (gap object): A permutation object in GAP. n (int): Number of nodes in the graph.
Returns: int: The total cycle count after considering moved points.
Source code in dsdp-lumping/lumping.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
delta_gen(log_extract, rho)
Computes a value of 'delta' based on the graph parameters and the number of orbits.
Parameters: log_extract (dict): Extracted log data containing information about the graph. rho (int): Number of orbits in the automorphism group.
Returns: int: The computed 'delta' value.
Source code in dsdp-lumping/lumping.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
|
gen_row(stubpath)
Generates a row of data for the output table based on the automorphism and log data.
Parameters: stubpath (str): The file path stub for the graph.
Returns: dict: A dictionary representing a row of data for the graph properties and automorphism group.
Source code in dsdp-lumping/lumping.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
|
main()
Main function to process graph data, compute automorphism group information, and generate an output table saved to a CSV file.
Source code in dsdp-lumping/lumping.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
|
norbits(zin, N, rho_method)
Counts the number of orbits and computes related group information using GAP.
Parameters: zin (str): GAP expression defining the group with generators. N (int): Number of nodes in the network. rho_method (str): Method for orbit calculation ('tuple' or 'polya').
tuple: - int: The number of orbits. - int: The order of the group. - list: The list of orbits (if applicable).
Source code in dsdp-lumping/lumping.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
polya_enum(G, N)
Performs Polya enumeration for a group.
Parameters: G (gap object): The group object in GAP. N (int): Number of nodes in the network.
Returns: float: The Polya enumeration result for the group.
Source code in dsdp-lumping/lumping.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
rationals_fix(rational)
Converts a rational number in string format to a float.
Parameters: rational (str): A string representation of a rational number (e.g., '3/4').
Returns: float: The numerical value of the rational number.
Source code in dsdp-lumping/lumping.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
read_am(aut_filename)
Reads in the automorphism data from a .gap file.
Parameters: aut_filename (str or Path): The path to the .gap file containing automorphism data.
Returns: list: A list of strings, where each string represents a line from the automorphism file.
Source code in dsdp-lumping/lumping.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
read_log(log_filename)
Reads log data from a .log file generated by Saucy.
Parameters: log_filename (str or Path): The path to the .log file.
Returns: dict: A dictionary with extracted log data, using specific keywords as keys.
Source code in dsdp-lumping/lumping.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|