Skip to content
Snippets Groups Projects
Verified Commit 3fe17d0b authored by David Procházka's avatar David Procházka
Browse files

ADD: distance measure enum, changed distance to double type

parent ff598df0
No related branches found
No related tags found
No related merge requests found
package mhtree;
public enum DistanceMeasure {
NEAREST_HULL_OBJECT,
FURTHEST_HULL_OBJECT,
SUM_OF_DISTANCES_TO_HULL_OBJECTS,
MEDOID
}
......@@ -6,7 +6,7 @@ public class ObjectToNodeDistanceRank implements Comparable<ObjectToNodeDistance
private final Node node;
private final LocalAbstractObject object;
private final float distance;
private final double distance;
public ObjectToNodeDistanceRank(Node node, LocalAbstractObject object) {
this.node = node;
......@@ -15,7 +15,7 @@ public class ObjectToNodeDistanceRank implements Comparable<ObjectToNodeDistance
}
public int compareTo(ObjectToNodeDistanceRank rank) {
return Float.compare(distance, rank.node.getDistance(object));
return Double.compare(distance, rank.node.getDistance(object));
}
public Node getNode() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment