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