@Override
    public boolean equals(Object obj) {
        if(this == obj) return true;    // same object
        if(!(obj instanceof Edge)) return false;
        
        final Edge e = (Edge)obj;
        return this.u == e.u && this.v == e.v;
    }