
timeBench.R.data.ScatterPlotDataObject Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timebench Show documentation
Show all versions of timebench Show documentation
TimeBench, a flexible, easy-to-use, and reusable software library written in Java that provides foundational data structures and algorithms for time- oriented data in Visual Analytics.
The newest version!
package timeBench.R.data;
import java.util.Arrays;
import prefuse.data.Table;
import prefuse.data.util.Index;
public class ScatterPlotDataObject {
private double[] x,y;
private int[] xint;
private double intercept, slope;
private double minX,maxX,minY,maxY;
public ScatterPlotDataObject(double[] x, double[] y, double intercept, double slope) {
super();
this.x = x;
this.y = y;
this.intercept = intercept;
this.slope = slope;
minX = maxX = minY = maxY = 0.0;
}
public ScatterPlotDataObject(int[] x, double[] y, double intercept, double slope) {
super();
this.xint = x;
this.y = y;
this.intercept = intercept;
this.slope = slope;
minX = maxX = minY = maxY = 0.0;
}
public int[] getIntX() {
return xint;
}
public double[] getX() {
return x;
}
public void setX(double[] x) {
this.x = x;
}
public double[] getY() {
return y;
}
public void setY(double[] y) {
this.y = y;
}
public double getIntercept() {
return intercept;
}
public void setIntercept(double intercept) {
this.intercept = intercept;
}
public double getSlope() {
return slope;
}
public void setSlope(double slope) {
this.slope = slope;
}
public double getMinX() {
return minX;
}
public void setMinX(double minX) {
this.minX = minX;
}
public double getMaxX() {
return maxX;
}
public void setMaxX(double maxX) {
this.maxX = maxX;
}
public double getMinY() {
return minY;
}
public void setMinY(double minY) {
this.minY = minY;
}
public double getMaxY() {
return maxY;
}
public void setMaxY(double maxY) {
this.maxY = maxY;
}
public double getMaxDataY() {
double max = 0.0;
for (int i = 0; i < y.length; i++) {
if (y[i]>max) max = y[i];
}
return max;
}
public double getMinDataY() {
double min = y[(int)Math.floor(y.length/2)];
for (int i = 0; i < y.length; i++) {
if (y[i]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy