The function getDataTvsR(G, maxR, stepR, algo, k=50, p=.01) is not perfect.
When the algo = CC_heuristic, the result that CC_heuristic returns is not the simple list of nodes,but a list of tuples, in which the first argument is a node and the second argument is its score.
So I insert a judgement .
if algo == CC_heuristic:
S = [item[0] for item in S]
The function getDataTvsR(G, maxR, stepR, algo, k=50, p=.01) is not perfect.
When the algo = CC_heuristic, the result that CC_heuristic returns is not the simple list of nodes,but a list of tuples, in which the first argument is a node and the second argument is its score.
So I insert a judgement .
if algo == CC_heuristic:
S = [item[0] for item in S]