Constructing logGraph from original graph
for ( int i = 0 ; i < V ; i ++ ) { for ( int j = 0 ; j < V ; j ++ ) { if ( graph [ i , j ] > 0 ) { logGraph [ i , j ] = Math . Log ( graph [ i , j ] ) ; } else { logGraph [ i , j ] = 0 ; } } }