Creating directed weighted edges
v [ 0 ] . Add_child ( 1 , 1 ) ; v [ 0 ] . Add_child ( 2 , 4 ) ; v [ 1 ] . Add_child ( 2 , 2 ) ; v [ 1 ] . Add_child ( 3 , 6 ) ; v [ 2 ] . Add_child ( 3 , 3 ) ; int [ ] path = new int [ v . Count ] ; int [ ] dist = dijkstraDist ( v , s , path ) ;