weighted graphs listing continued if!vertexlist[jisintree &/smaller than old one spath[jdistance mindist mindist spath[jdistanceindexmin /update minimum /end for return indexmin/return index of minimum /end getmin(/public void adjust_spath(/adjust values in shortest-path array spath int column /skip starting vertex while(column nverts/go across columns /if this column' vertex already in treeskip it ifvertexlist[columnisintree column++continue/calculate distance for one spath entry /get edge from currentvert to column int currenttofringe adjmat[currentvert][column]/add distance from start int starttofringe starttocurrent currenttofringe/get distance of current spath entry int spathdist spath[columndistance/compare distance from start with spath entry if(starttofringe spathdist/if shorter/update spath spath[columnparentvert currentvertspath[columndistance starttofringecolumn++/end while(column nverts/end adjust_spath(/public void displaypaths(