|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.PairError
public class PairError
A simple class that collects a double pair (x,y) and their errors (dx,dy).
Both, the value pair and the errors are stored as Vector2D.
| Field Summary | |
|---|---|
private Vector2D |
error
The errors to the values. |
private Vector2D |
value
The value pair. |
| Constructor Summary | |
|---|---|
PairError()
Constructs a new valuer/error pair. |
|
PairError(double x,
double y,
double dx,
double dy)
Constructs a valid value/error pair. |
|
PairError(Vector2D val,
Vector2D err)
Constructs a valid value/error pair. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object that)
Checks for equality. |
double |
getErrorX()
Returns the x-error. |
double |
getErrorY()
Returns the y-error. |
double |
getValueX()
Returns the x-value. |
double |
getValueY()
Returns the y-value. |
void |
setError(double dx,
double dy)
Sets the error pair. |
void |
setValue(double x,
double y)
Sets the value pair. |
String |
toString()
Convert the value/error pair to a string. |
private String |
valueError(int index)
Takes the coordinate of the given index of the value and the error part and returns them combined with a plus/minus sign. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Vector2D value
private Vector2D error
| Constructor Detail |
|---|
public PairError()
public PairError(Vector2D val,
Vector2D err)
val - Value, x and y.err - Error, error of x and y.
public PairError(double x,
double y,
double dx,
double dy)
x - The x-value.y - The y-value.dx - The error of the x-value.dy - The error of the y-value.| Method Detail |
|---|
public double getValueX()
public double getValueY()
public double getErrorX()
public double getErrorY()
public void setValue(double x,
double y)
Vector2D.
x - The x-value.y - The y-value.
public void setError(double dx,
double dy)
Vector2D.
dx - The error of the x-value.dy - The error of the y-value.public boolean equals(Object that)
Vector2D representing the value and the error are equal.
equals in class Objectpublic String toString()
toString in class Objectprivate String valueError(int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||