()
| 50 | |
| 51 | |
| 52 | def main(): |
| 53 | names = list(input("Enter Names of the Nodes: ").split()) |
| 54 | |
| 55 | nodes = [Node(name) for name in names] |
| 56 | |
| 57 | for ri, row in enumerate(graph): |
| 58 | for ci, col in enumerate(row): |
| 59 | if col == 1: |
| 60 | nodes[ci].add_inbound(names[ri]) |
| 61 | nodes[ri].add_outbound(names[ci]) |
| 62 | |
| 63 | print("======= Nodes =======") |
| 64 | for node in nodes: |
| 65 | print(node) |
| 66 | |
| 67 | page_rank(nodes) |
| 68 | |
| 69 | |
| 70 | if __name__ == "__main__": |
no test coverage detected