|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sv.graph.Data1D
The Data1D class stores a dataset for f(x).
Field Summary | |
int |
bytesRead
|
float[] |
fx
|
int |
highlightEnd
|
int |
highlightStart
|
int |
nPoints
|
boolean |
selected
|
int |
thickness
|
float[] |
x
|
Constructor Summary | |
Data1D()
|
|
Data1D(java.lang.String name,
int nPoints)
Create the dataset. |
|
Data1D(java.lang.String name,
int nPoints,
float[] x,
float[] fx)
Create the dataset. |
Method Summary | |
void |
addFx(float fxIn)
Set the next f(x) value. |
void |
addPoints(Data1D d)
|
void |
addX(float xIn)
Set the next X value. |
double[] |
closestPoint(double[] xy)
|
int |
closestXPoint(double[] xy)
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D.Float plotArea,
float xMin,
float xMax,
float fxMin,
float fxMax)
|
void |
drawLine(boolean draw)
Set whether a line is drawn between data points |
void |
drawMarker(boolean draw)
Set whether a marker is drawn at each data point |
java.lang.Exception |
read(java.io.DataInputStream in)
|
void |
setColor(java.awt.Color c)
|
void |
setThickness(int t)
|
double |
shortestYDistance(double[] xy)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public float[] x
public float[] fx
public int thickness
public int highlightStart
public int highlightEnd
public boolean selected
public int nPoints
public int bytesRead
Constructor Detail |
public Data1D()
public Data1D(java.lang.String name, int nPoints)
name
- - The name of the dataset.nPoints
- - The number of points in the dataset.public Data1D(java.lang.String name, int nPoints, float[] x, float[] fx)
name
- - The name of the dataset.nPoints
- - The number of points in the dataset.x
- - Array of X values.fx
- - Array of f(X) values.Method Detail |
public void addX(float xIn)
xIn
- - The next X value.public void addFx(float fxIn)
fxIn
- - The next f(x) value.public void drawMarker(boolean draw)
draw
- - true: a marker is drawn; false: a marker is not drawn (default).public void drawLine(boolean draw)
draw
- - true: a line is drawn (default); false: a line is not drawn.public void addPoints(Data1D d)
public void setColor(java.awt.Color c)
public void setThickness(int t)
public double shortestYDistance(double[] xy)
public double[] closestPoint(double[] xy)
public int closestXPoint(double[] xy)
public java.lang.Exception read(java.io.DataInputStream in)
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D.Float plotArea, float xMin, float xMax, float fxMin, float fxMax)
|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |