Constructing logGraph from original graph
for i in range ( V ) : NEW_LINE INDENT for j in range ( V ) : NEW_LINE INDENT if ( graph [ i ] [ j ] > 0 ) : NEW_LINE INDENT logGraph [ i ] [ j ] = math . log ( graph [ i ] [ j ] ) NEW_LINE DEDENT else : NEW_LINE INDENT logGraph [ i ] [ j ] = 0 NEW_LINE DEDENT DEDENT DEDENT