Returns nodes format nodes={bitcode:edges that represent the bitcode} >>> get_nodes([['ab', 5, '11111'], ['ac', 5, '11111'], ['df', 5, '11111'], ... ['bd', 5, '11111'], ['bc', 5, '11111']]) {'11111': ['ab', 'ac', 'df', 'bd', 'bc']}
(frequency_table)
| 72 | |
| 73 | |
| 74 | def get_nodes(frequency_table): |
| 75 | """ |
| 76 | Returns nodes |
| 77 | format nodes={bitcode:edges that represent the bitcode} |
| 78 | >>> get_nodes([['ab', 5, '11111'], ['ac', 5, '11111'], ['df', 5, '11111'], |
| 79 | ... ['bd', 5, '11111'], ['bc', 5, '11111']]) |
| 80 | {'11111': ['ab', 'ac', 'df', 'bd', 'bc']} |
| 81 | """ |
| 82 | nodes = {} |
| 83 | for _, item in enumerate(frequency_table): |
| 84 | nodes.setdefault(item[2], []).append(item[0]) |
| 85 | return nodes |
| 86 | |
| 87 | |
| 88 | def get_cluster(nodes): |
no test coverage detected