|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.AssignedVariable
public class AssignedVariable
A simple named variable with error, name and unit.
| Field Summary | |
|---|---|
private double |
error
Error of parameter. |
private String |
name
Name of parameter. |
private String |
unit
Parameter unit or empty. |
private double |
value
Value of parameter. |
| Constructor Summary | |
|---|---|
AssignedVariable(String n,
double v)
Defaults to no unit and NaN as error. |
|
AssignedVariable(String n,
double v,
double err)
Defautls to no unit. |
|
AssignedVariable(String n,
double v,
double err,
String u)
All parameter properties known. |
|
| Method Summary | |
|---|---|
static List<Variable> |
asList(String[] names,
double[] vals,
double[] errs,
String[] units)
For convenienve, we can transform an array of String names, values, errors and units to a list of model parameters. |
boolean |
equals(Object that)
To variables are equal if they have the same name, value, error and unit. |
double |
getError()
Getter method of private variable. |
String |
getName()
Getter method of private variable. |
String |
getUnit()
Getter method of private variable. |
double |
getValue()
Getter method of private variable. |
int |
hashCode()
Has from variable name. |
static NumberFormat |
significant(Variable v)
From the error we estimate a formatter that round to significant digits. |
static NumberFormat |
significant(Variable v,
int extra)
From the error we estimate a formatter that round to significant digits. |
String |
toString()
Name plus value, if error is NaN append with PM sign. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String name
private double value
private double error
private String unit
| Constructor Detail |
|---|
public AssignedVariable(String n,
double v)
public AssignedVariable(String n,
double v,
double err)
public AssignedVariable(String n,
double v,
double err,
String u)
| Method Detail |
|---|
public String getName()
getName in interface Variablepublic double getValue()
getValue in interface Variablepublic double getError()
getError in interface Variablepublic String getUnit()
getUnit in interface Variablepublic boolean equals(Object that)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic static NumberFormat significant(Variable v)
public static NumberFormat significant(Variable v,
int extra)
public static List<Variable> asList(String[] names,
double[] vals,
double[] errs,
String[] units)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||