#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# deg = [ 3 , 2 , 2 , 1 , 0 ] #NEWLINE# self . G = havel_hakimi_graph ( deg ) #NEWLINE# self . OI = numpy . array ( [ [ ( - 1 ) , ( - 1 ) , ( - 1 ) , 0 ] , [ 1 , 0 , 0 , ( - 1 ) ] , [ 0 , 1 , 0 , 1 ] , [ 0 , 0 , 1 , 0 ] , [ 0 , 0 , 0 , 0 ] ] ) #NEWLINE# self . A = numpy . array ( [ [ 0 , 1 , 1 , 1 , 0 ] , [ 1 , 0 , 1 , 0 , 0 ] , [ 1 , 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 0 ] ] ) #NEWLINE# self . WG = nx . Graph ( ( ( u , v , { #NEWLINE# #INDENT# 'weight' : 0.5 , #NEWLINE# 'other' : 0.3 , #NEWLINE# #UNINDENT# } ) for ( u , v ) in self . G . edges_iter ( ) ) ) #NEWLINE# self . WG . add_node ( 4 ) #NEWLINE# self . WA = numpy . array ( [ [ 0 , 0.5 , 0.5 , 0.5 , 0 ] , [ 0.5 , 0 , 0.5 , 0 , 0 ] , [ 0.5 , 0.5 , 0 , 0 , 0 ] , [ 0.5 , 0 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 0 ] ] ) #NEWLINE# self . MG = nx . MultiGraph ( u . G ) #NEWLINE# self . MG2 = self . MG . copy ( ) #NEWLINE# self . MG2 . add_edge ( 0 , 1 ) #NEWLINE# self . MG2A = numpy . array ( [ [ 0 , 2 , 1 , 1 , 0 ] , [ 2 , 0 , 1 , 0 , 0 ] , [ 1 , 1 , 0 , 0 , 0 ] , [ 1 , 0 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 0 ] ] ) #NEWLINE# self . MGOI = numpy . array ( [ [ ( - 1 ) , ( - 1 ) , ( - 1 ) , ( - 1 ) , 0 ] , [ 1 , 1 , 0 , 0 , ( - 1 ) ] , [ 0 , 0 , 1 , 0 , 1 ] , [ 0 , 0 , 0 , 1 , 0 ] , [ 0 , 0 , 0 , 0 , 0 ] ] )