Datasets:
ArXiv:
License:
Download data/train/MrWe/bioAI/task2/src/Centroid.java from RepoFusion/Stack-Repo: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/MrWe/bioAI/task2/src/Centroid.java
- Command line
-
hf download hf://datasets/RepoFusion/Stack-Repo/data/train/MrWe/bioAI/task2/src/Centroid.java
-
curl -L -o Centroid.java https://huggingface.co/datasets/RepoFusion/Stack-Repo/resolve/main/data/train/MrWe/bioAI/task2/src/Centroid.java
1.04 kB
| 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; | |
| } | |
| } | |