public double CompareTo(edge other)
 {
     return(w.CompareTo(other.w));
 }