@Override
    public int compareTo(WeightedPoint other)
    {
        if (other == null || this.getCost() > other.getCost())
            return 1;
        else if (this.getCost() < other.getCost())
            return -1;
        return 0;
    }