#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# G = networkx . DiGraph ( ) #NEWLINE# edges = [ ( 1 , 2 ) , ( 1 , 3 ) , ( 3 , 1 ) , ( 3 , 2 ) , ( 3 , 5 ) , ( 4 , 5 ) , ( 4 , 6 ) , ( 5 , 4 ) , ( 5 , 6 ) , ( 6 , 4 ) ] #NEWLINE# G . add_edges_from ( edges ) #NEWLINE# self . G = G #NEWLINE# self . G . pagerank = dict ( zip ( self , [ 0.03721197 , 0.05395735 , 0.04150565 , 0.37508082 , 0.20599833 , 0.28624589 ] ) ) #NEWLINE# self . dangling_node_index = 1 #NEWLINE# self . dangling_edges = { #NEWLINE# #INDENT# 1 : 2 , #NEWLINE# 2 : 3 , #NEWLINE# 3 : 0 , #NEWLINE# 4 : 0 , #NEWLINE# 5 : 0 , #NEWLINE# 6 : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# self . G . dangling_pagerank = dict ( zip ( G , [ 0.10844518 , 0.18618601 , 0.0710892 , 0.2683668 , 0.15919783 , 0.20671497 ] ) )