public class DataPoints
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addPoint(MyPoint p)
add a point to the data set that is determined by the index (setNum)
|
void |
clearAllSets()
clear out all point form the data sets
|
static java.awt.Point |
convertMyPoint(MyPoint dpoint,
int panelWidth,
int panelHeight,
DisplayScale scale)
Converts an instance of MyPoint to an instance of Point
|
static java.util.Vector<java.awt.Point> |
convertMyPoints(java.util.Vector<MyPoint> dset,
int panelWidth,
int panelHeight,
DisplayScale scale)
Converts a Vector of MyPoints to a Vector of points that correspond to
Java coordinates.
|
static MyPoint |
convertPoint(java.awt.Point jpoint,
int panelWidth,
int panelHeight,
DisplayScale scale)
Converts an instance of Point to an instance of MyPoint containing the
cartesian x-y values
|
static java.util.Vector<MyPoint> |
convertPoints(java.util.Vector<java.awt.Point> jset,
int panelWidth,
int panelHeight,
DisplayScale scale)
Converts a vector of Points to a vector of MyPoints containing the
cartesian x-y values
|
void |
drawGaussian(double meanx,
double meany,
DisplayScale scale)
Draws Gaussian distribution by calling setGaussian()
|
boolean |
initialize()
initializes dset1-dset4
|
boolean |
isDataValid()
method returns true if valid data is present else it returns false
|
void |
setColors(java.awt.Color color_dset1,
java.awt.Color color_dset2,
java.awt.Color color_dset3,
java.awt.Color color_dset4)
sets the gaussian values
|
void |
setDrawGaussValues(int points,
double cov11,
double cov12,
double cov21,
double cov22)
sets the gaussian values
|
void |
setFourEllipses(DisplayScale scale)
create a set of point that correspond to four ellipses to
be displayed on the input canvas
|
void |
setFourGaussian(DisplayScale scale)
create a set of point that correspond to four gaussians to
be displayed on the input canvas
method: setFourGaussian
|
void |
setGaussian(int points,
double meanx,
double meany,
double c11,
double c12,
double c21,
double c22,
DisplayScale scale)
creates a set of point that correspond to a gaussians distribution
|
void |
setLorentzSignal(DisplayScale scale)
Draws a Lorentz generated signal.
|
void |
setOverGaussian(DisplayScale scale)
create a set of point that correspond to two overlapped gaussians to
be displayed on the input canvas
|
void |
setRandomSignal(DisplayScale scale)
Draws a randomly generated signal.
|
void |
setRotatedEllipses(DisplayScale scale)
create a set of point that correspond to two rotated ellipses to
be displayed on the input canvas
|
void |
setToroidal(DisplayScale scale)
create a set of point that correspond a toroidal to
be displayed on the input canvas
|
void |
setTwoEllipses(DisplayScale scale)
create a set of point that correspond to two ellipses to
be displayed on the input canvas
|
void |
setTwoGaussian(DisplayScale scale)
create a set of point that correspond to two gaussians to
be displayed on the input canvas
|
void |
setYinYang(DisplayScale scale)
create a set of point that correspond a yin and yang symbol to
be displayed on the input canvas
|
public boolean initialize()
public boolean isDataValid()
public void clearAllSets()
public void addPoint(MyPoint p)
p
- point to be added to the input data classpublic void drawGaussian(double meanx, double meany, DisplayScale scale)
meanx
- double x value of mean pointmeany
- double y value of mean pointscale
- DisplayScale variable used for displayingpublic void setGaussian(int points, double meanx, double meany, double c11, double c12, double c21, double c22, DisplayScale scale)
points
- max points in the distributionmeanx
- mean (x) of the distributionmeany
- mean (y) of the distributionc11
- covariance matrix element c11c12
- covariance matrix element c12c21
- covariance matrix element c21c22
- covariance matrix element c22scale
- DisplayScale variablepublic void setTwoGaussian(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setFourGaussian(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setOverGaussian(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setTwoEllipses(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setRotatedEllipses(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setFourEllipses(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setToroidal(DisplayScale scale)
scale
- DisplayScale variable used for displayingpublic void setYinYang(DisplayScale scale)
scale
- DisplayScale variable used for viewingpublic void setRandomSignal(DisplayScale scale)
scale
- DisplayScale variable used for viewingpublic void setLorentzSignal(DisplayScale scale)
scale
- DisplayScale variable used for viewingpublic static MyPoint convertPoint(java.awt.Point jpoint, int panelWidth, int panelHeight, DisplayScale scale)
jpoint
- Point variable used to set MyPointpanelWidth
- Width of viewing panelpanelHeight
- Height of viewing panelscale
- DisplayScale variable used for viewingpublic static java.util.Vector<MyPoint> convertPoints(java.util.Vector<java.awt.Point> jset, int panelWidth, int panelHeight, DisplayScale scale)
jset
- Vector of points to be convertedpanelWidth
- Width of viewing panelpanelHeight
- Height of viewing panelpublic static java.awt.Point convertMyPoint(MyPoint dpoint, int panelWidth, int panelHeight, DisplayScale scale)
dpoint
- MyPoint to be convertedpanelWidth
- Width of panel for viewingpanelHeight
- Width of panel for viewingpublic static java.util.Vector<java.awt.Point> convertMyPoints(java.util.Vector<MyPoint> dset, int panelWidth, int panelHeight, DisplayScale scale)
dset
- Vector of MyPoints to be converted to Vector of PointspanelWidth
- Width of panel for viewingpanelHeight
- Height of panel for viewingpublic void setDrawGaussValues(int points, double cov11, double cov12, double cov21, double cov22)
points
- number of pointscov11
- double value of covariance11cov12
- double value of covariance12cov21
- double value of covariance21cov22
- double value of covariance22public void setColors(java.awt.Color color_dset1, java.awt.Color color_dset2, java.awt.Color color_dset3, java.awt.Color color_dset4)
color_dset1
- color for data set 1color_dset2
- color for data set 2color_dset3
- color for data set 3color_dset4
- color for data set 4