|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.lcsim.hmatrix.HMatrix
This class allows one to calculate how well a measurement agrees with expectations.
The vector of average values and the associated covariance matrix is used to construct
the HMatrix. The degree of agreement is calculated as a chi-squared of a measurement
vector against the expectations.
The covariance matrix is defined as:
|
|
| Constructor Summary | |
HMatrix(int dim,
int key,
double[] vec,
double[][] cov)
Constructor |
|
| Method Summary | |
double |
chisquared(double[] dat)
Calculates the chi-squared for the measurement compared to the expected values and covariances represented by the HMatrix. |
static HMatrix |
read(java.lang.String filename)
Reads the HMatrix from an ASCII file |
static HMatrix |
readSerialized(java.lang.String filename)
Reads the HMatrix from a Serialized file |
java.lang.String |
toString()
Output stream |
void |
write(java.lang.String filename,
java.lang.String comment)
Writes out the HMatrix to an ASCII file |
void |
writeSerialized(java.lang.String filename)
Writes the HMatrix to a Serialized file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public HMatrix(int dim,
int key,
double[] vec,
double[][] cov)
key - the key for indexing this HMatrixvec - The array of average values for the measurement space.cov - The inverse of the covariance matrix for the averages.| Method Detail |
public double chisquared(double[] dat)
dat - The array of measured values
public java.lang.String toString()
public void writeSerialized(java.lang.String filename)
public static HMatrix readSerialized(java.lang.String filename)
public void write(java.lang.String filename,
java.lang.String comment)
public static HMatrix read(java.lang.String filename)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||