Create a matrix with value 1 if an edge exist between 2 nodes else 0 from an adjacency dictionary

前端 未结 0 881
暖寄归人
暖寄归人 2020-11-28 14:57

I have an adjacency dictionary like this:

dic = {31: {88, 42}, 42: {53}, 55: {88, 99, 77}, 77: {88}, 53: {88, 44}, 44: {55}, 88: {99}, 99: {77}}
相关标签:
回答
  • 消灭零回复
提交回复
热议问题