File size: 1,040 Bytes
c574d3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
public class Centroid {
private int x;
private int y;
private int color;
private double overallDeviation;
private double edgeValue;
private String hash;
public Centroid(int x, int y, int c) {
this.x = x;
this.y = y;
this.color = c;
this.hash = createHash();
}
public void updateCentroid() {
}
private String createHash() {
return (int) this.x + "" + (int) this.y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getColor() {
return color;
}
public double getOverallDeviation() {
return overallDeviation;
}
public void setOverallDeviation(double overallDeviation) {
this.overallDeviation = overallDeviation;
}
public String getHash() {
return hash;
}
public double getEdgeValue() {
return edgeValue;
}
public void setEdgeValue(double edgeValue) {
this.edgeValue = edgeValue;
}
}
|