#NEWLINE# def setNeighbors( self ) : #NEWLINE# #INDENT# '\n        Sets the internal NEIGHBORS variable\n\n        .. note::\n\n            Requires a call to setUniqueEdges() first.\n\n        ' #NEWLINE# self . NEIGHBORS = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for edgePair in self . UNIQUE_EDGES : #NEWLINE# #INDENT# ( s , d ) = edgePair #NEWLINE# if ( s in i . NEIGHBORS ) : #NEWLINE# #INDENT# self . NEIGHBORS [ s ] += [ d ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . NEIGHBORS [ s ] = [ d ] #NEWLINE# #UNINDENT# if ( d in self . NEIGHBORS ) : #NEWLINE# #INDENT# self . NEIGHBORS [ d ] += [ s ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . NEIGHBORS [ d ] = [ s ] #NEWLINE# #UNINDENT# #UNINDENT# for i in range ( self . computers_num ) : #NEWLINE# #INDENT# self . NEIGHBORS [ i ] = np . array ( self . NEIGHBORS [ i ] )